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

Fix literal issue in HiveDialect

    XMLWordPrintableJSON

Details

    Description

      in FLINK-26474, we try to fold constant, but it brings a issue that the folded constant like `Double.NAN` and no-primitive type  can't be convert into calcite literal in method  `HiveParserRexNodeConverter#convertConstant`.

      For example, the following code will throw an exception "org.apache.hadoop.hive.ql.parse.SemanticException: NaN" in method `HiveParserRexNodeConverter#convertConstant`

      // hive dialect
      SELECT asin(2); 

      To fix it, we need to figure out such case and then not to fold constant .

       

      in FLINK-27017, we use Hive's `GenericUDFOPDivide` to do divide for better compatibility, but it bring a issue that when use a int/long literal as divisor, the result type passed and inferred type may not match.

      The fix it, we need to make the result type match the inferred type.

       

      Attachments

        Activity

          People

            luoyuxia luoyuxia
            luoyuxia luoyuxia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: