zabetak commented on code in PR #6014:
URL: https://github.com/apache/hive/pull/6014#discussion_r2330574329
##########
ql/src/test/queries/clientpositive/lateral_view_cbo_ppd_filter_loss.q:
##########
@@ -0,0 +1,33 @@
+-- SORT_QUERY_RESULTS
+-- HIVE-29084: LATERAL VIEW cartesian product schema construction
+
+-- Verifies PPD doesn't eliminate OR filter comparing base table vs lateral
view columns
+SELECT t.key, t.value, lv.col
+FROM (SELECT '238' AS key, 'val_238' AS value) t
+LATERAL VIEW explode(array('238', '86', '311')) lv AS col
+WHERE t.key = '333' OR lv.col = '86'
Review Comment:
Due to the bug the `t.key = '333' OR lv.col = '86'` predicate is removed
completely. If we don't look at the plan (and just look at the results) how we
can be sure that `t.key = '333'` is still taking effect after the fix if we
don't have such values as part of the data.
--
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]