konstantinb commented on code in PR #6014:
URL: https://github.com/apache/hive/pull/6014#discussion_r2320309737


##########
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:
   I deliberately used a value that did not match the key to demonstrate that 
the filter was **not** eliminating values with incorrect key column values. I 
have simplified the test query, but left this situation in, as I believe it 
very clearly demonstrates the nature of the bug:
   <img width="628" height="1233" alt="HIVE-2904 extra rows using pre-fix code" 
src="https://github.com/user-attachments/assets/bc240812-577c-4ae4-97b0-6d9eaa32ef6c";
 />
   
   



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to