Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: SQL, Tests
    • Labels:
      None

      Description

      This issue improves `LogicalPlanToSQLSuite` to check the generated SQL directly by structure. So far, `LogicalPlanToSQLSuite` relies on `checkHiveQl` to ensure the successful SQL generation and answer equality. However, it does not guarantee the generated SQL is the same and will not be changed unnoticeably.

      The following is an example result of this issue.

      -    checkHiveQl("SELECT * FROM parquet_t0 TABLESAMPLE(0.1 PERCENT) WHERE 1=0")
      +    checkHiveQl("SELECT * FROM parquet_t0 TABLESAMPLE(0.1 PERCENT) WHERE 1=0",
      +      """
      +        |SELECT `gen_attr` AS `id`
      +        |FROM (SELECT `gen_attr`
      +        |      FROM (SELECT `id` AS `gen_attr`
      +        |            FROM `default`.`parquet_t0`
      +        |            TABLESAMPLE(0.1 PERCENT))
      +        |            AS gen_subquery_0
      +        |      WHERE (1 = 0))
      +        |      AS parquet_t0
      +      """.stripMargin)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dongjoon Dongjoon Hyun
                Reporter:
                dongjoon Dongjoon Hyun
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: