Zihao Ye has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20891 )

Change subject: IMPALA-12582: Fix crash when enabling MIN_MAX RuntimeFilter in 
Nested Loop Join
......................................................................


Patch Set 2:

(2 comments)

Thank you for the code review!

http://gerrit.cloudera.org:8080/#/c/20891/2/tests/query_test/test_join_queries.py
File tests/query_test/test_join_queries.py:

http://gerrit.cloudera.org:8080/#/c/20891/2/tests/query_test/test_join_queries.py@116
PS2, Line 116:   def test_nested_loop_joins_with_min_max_runtime_filter(self, 
vector, unique_database):
> Checked the original patch that added the bug and it did add a test with ne
Yes, I simplified the triggering query. In the simplest case, it only needs two 
conditions to trigger, as follows:

set disable_codegen=true;
select col from tbl where col <= (select abs(max(col2)) from tbl2);

First, codegen needs to be disabled, and the column 'col' in the query should 
be a sorted or partitioned column so that we can apply min-max runtime filter. 
Additionally, the outer layer of the subsequent aggregate function (in this 
case, max) requires a function call expression (in this case, abs), which of 
course can be another suitable function. The function call expression can also 
be a more complex nested call. In some complexed expressions, set 
disable_codegen=true is also not necessary to trigger the issue, just like the 
original triggering query. Maybe due to the codegen does not cover all code 
paths, I guess.
As for the old query, it mainly lacks the outer layer of a function call 
expression for the aggregate function, hence it does not trigger the issue.


http://gerrit.cloudera.org:8080/#/c/20891/2/tests/query_test/test_join_queries.py@120
PS2, Line 120:         "CREATE TABLE {0} (id int) PARTITIONED BY(dt string) "
> optional: I think that this would be more readable if it was moved to an ex
Done, moving it to overlap_min_max_filters_on_partition_columns.test would be 
more appropriate.



--
To view, visit http://gerrit.cloudera.org:8080/20891
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iba951796d52f109c419587c444840adbb2d44f5d
Gerrit-Change-Number: 20891
Gerrit-PatchSet: 2
Gerrit-Owner: Zihao Ye <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zihao Ye <[email protected]>
Gerrit-Comment-Date: Tue, 16 Jan 2024 09:47:00 +0000
Gerrit-HasComments: Yes

Reply via email to