Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
v2.6.2
-
None
Description
When executing a sql query, the limit should not be pushdown to storage scan level if group by clause is an expression of columns.
For example:
SELECT (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) AS "LSTG_FORMAT_NAME__group_", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT" GROUP BY (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) limit 4
In this SQL, group by clause is an expression, the limit should NOT be push-down to storage scan level, otherwise, the result is incorrect
Attachments
Issue Links
- links to