Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-19211

SQL Read Decimal In Parquet Error

    XMLWordPrintableJSON

Details

    Description

      Use impala-3.2.0-cdh6.3.2 to create a parquet table with a decimal column:

           create table test (a int, b decimal(15, 6)) stored as parquet;

           insert into test values (1, 1.1), (2, 2.2), (3, 3.3);

      then use sql-client on hive:

           select * from test

      give an error :

      Caused by: java.lang.UnsupportedOperationException: org.apache.flink.hive.shaded.parquet.column.values.dictionary.PlainValuesDictionary$PlainBinaryDictionary
              at org.apache.flink.hive.shaded.parquet.column.Dictionary.decodeToLong(Dictionary.java:49)
              at org.apache.flink.hive.shaded.formats.parquet.vector.ParquetDictionary.decodeToLong(ParquetDictionary.java:44)
              at org.apache.flink.table.data.vector.heap.HeapLongVector.getLong(HeapLongVector.java:49)
              at org.apache.flink.hive.shaded.formats.parquet.vector.ParquetDecimalVector.getDecimal(ParquetDecimalVector.java:50)
              at org.apache.flink.table.data.vector.VectorizedColumnBatch.getDecimal(VectorizedColumnBatch.java:115)
              at org.apache.flink.table.data.ColumnarRowData.getDecimal(ColumnarRowData.java:119)
              at org.apache.flink.table.data.RowData.get(RowData.java:276)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            nyq nyq
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: