Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
Impala 4.4.1
-
None
-
None
-
ghx-label-9
Description
We seem to have missed handling the WITH clause during expression rewriting. For example, executing the following query:
WITH t AS (SELECT upper('abc') FROM test WHERE id > 0 OR false) SELECT * FROM t;
It can obviously be rewritten as:
WITH t AS (SELECT 'ABC' FROM `default`.test WHERE id > CAST(0 AS INT)) SELECT * FROM t;
However, in the 'Text plan', the analyzed query we actually get is as follows:
WITH t AS (SELECT upper('abc') FROM `default`.test WHERE id > CAST(0 AS INT) OR FALSE) SELECT * FROM t;