Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4435

HIVE: decimal datatype is treated like a string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.1, 9.0.4
    • 8.12.3
    • Misc. Connectors
    • None

      Teiid maps Decimal column (DECIMAL(9,4)) to "java.lang.String" when using org.teiid.translator.hive.HiveExecutionFactory. I would expect it to map to "java.math.BigDecimal" or something else.

      Here is my table:

      CREATE TABLE tableWithAllTypes(column_bigint BIGINT, column_boolean BOOLEAN, column_char CHAR(1), column_decimal DECIMAL(9,4), column_double DOUBLE, column_float FLOAT, column_int INT, column_smallint SMALLINT, column_string STRING, column_timestamp TIMESTAMP, column_tinyint TINYINT, column_varchar VARCHAR(64)) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';

              rhn-engineering-shawkins Steven Hawkins
              mchantibco Ivan Chan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: