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

Unable to query Hive table with decimal column

    XMLWordPrintableJSON

Details

    Description

      Hit the following exception when access a Hive table with decimal column:

      Caused by: org.apache.flink.table.api.TableException: TableSource of type org.apache.flink.batch.connectors.hive.HiveTableSource returned a DataSet of data type ROW<`x` LEGACY(BigDecimal)> that does not match with the data type ROW<`x` DECIMAL(10, 0)> declared by the TableSource.getProducedDataType() method. Please validate the implementation of the TableSource.
       at org.apache.flink.table.plan.nodes.dataset.BatchTableSourceScan.translateToPlan(BatchTableSourceScan.scala:118)
       at org.apache.flink.table.api.internal.BatchTableEnvImpl.translate(BatchTableEnvImpl.scala:303)
       at org.apache.flink.table.api.internal.BatchTableEnvImpl.translate(BatchTableEnvImpl.scala:281)
       at org.apache.flink.table.api.internal.BatchTableEnvImpl.writeToSink(BatchTableEnvImpl.scala:117)
       at org.apache.flink.table.api.internal.TableEnvImpl.insertInto(TableEnvImpl.scala:564)
       at org.apache.flink.table.api.internal.TableEnvImpl.insertInto(TableEnvImpl.scala:516)
       at org.apache.flink.table.api.internal.BatchTableEnvImpl.insertInto(BatchTableEnvImpl.scala:59)
       at org.apache.flink.table.api.internal.TableImpl.insertInto(TableImpl.java:428)
      
      

      Attachments

        Issue Links

          Activity

            People

              lirui Rui Li
              lirui Rui Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m