Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5741 External JDBC Read Support
  3. IMPALA-12925

Fix decimal data type for external JDBC table

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.4.0
    • Frontend
    • None
    • ghx-label-7

    Description

      The data types in unit-test table alltypes do not include decimal. The data type of column partsupp.ps_supplycost is decimal(12,2).
      Create an external JDBC table to query table tpch.partsupp on remote Impala cluster. Select statement on the JDBC table return wrong values for column partsupp.ps_supplycost. Lots of returned values are negative.
      Decimal type is listed as supported primitive data type in DataSourceTable.java(https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java#L153).
      But it seems the data type is not handled properly which cause wrong value returned from backend DataSourceScanNode.
      Another issue is that the decimal data type is not handled in frontend DataSourceScanNode.java (https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java#L152) so that decimal type of predicates cannot be pushed down.

      Attachments

        Activity

          People

            wzhou Wenzhe Zhou
            wzhou Wenzhe Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: