asolimando commented on a change in pull request #3033:
URL: https://github.com/apache/hive/pull/3033#discussion_r813079737
##########
File path: ql/src/test/results/clientpositive/llap/subquery_scalar.q.out
##########
@@ -491,25 +484,25 @@ STAGE PLANS:
aggregations: count(VALUE._col0)
mode: mergepartial
outputColumnNames: _col0
- Statistics: Num rows: 1 Data size: 196 Basic stats: COMPLETE
Column stats: NONE
- Limit
- Number of rows: 0
- Statistics: Num rows: 0 Data size: 0 Basic stats: COMPLETE
Column stats: NONE
+ Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE
Column stats: NONE
+ Filter Operator
+ predicate: sq_count_check(_col0) (type: boolean)
+ Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE
Column stats: NONE
Review comment:
In Calcite, `false` predicates produce a rewrite of the whole subtree as
`LogicalValues(tuples=[[]])`, that's why this case is not handled there.
For instance,
```
LogicalJoin(condition=[=($7, $9)], joinType=[inner])
LogicalFilter(false) <-- or AND(=($1, 1), =($1, 2))
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
```
is transformed into:
```
LogicalJoin(condition=[=($7, $9)], joinType=[inner])
LogicalValues(tuples=[[]])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
```
Addition to Calcite the support for predicates not referencing any field
would be trivial, but since this case can't happen there, it cannot be
reproduced and it's hard to justify the change.
I don't know if this can be considered a blocker, it seems a rather extreme
case to me.
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]