Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3589

SqlValidatorException when conformation is set to LENIENT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      error occurs conditions (all three conditions must be met):

      • conformance = LENIENT
      • The alias of the expression in select is the same as the column name of the column used in the expression
      • group by or having use the above expression

      a simple example is as follows:

      SELECT SELLER_ID + 1 AS SELLER_ID, sum(PRICE)
      FROM TEST_KYLIN_FACT
      GROUP BY SELLER_ID + 1

      will change to 

      SELECT SELLER_ID + 1 AS SELLER_ID, sum(PRICE)
      FROM TEST_KYLIN_FACT
      GROUP BY SELLER_ID + 1 + 1

      after org.apache.calcite.sql.validate.SqlValidatorImpl#expandGroupByOrHavingExpr

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bingfeng bingfeng.guo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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