-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](RF) fix 'Invalid value' error of RF of datetimev2 type for max value #32649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -221,4 +221,114 @@ suite("test_runtimefilter_on_datev2", "nereids_p0") { | |
| qt_join1 """ | ||
| SELECT * FROM ${dateTable} a, ${dateV2Table} b WHERE a.date = b.date; | ||
| """ | ||
|
|
||
| // bug fix | ||
| sql "set disable_join_reorder=true;" | ||
| sql "set enable_runtime_filter_prune=false;" | ||
| sql "set runtime_filter_type='MIN_MAX';" | ||
| sql "set runtime_filter_wait_time_ms=10000;" | ||
|
|
||
| // test date | ||
| sql "drop table if exists dt_rftest_l"; | ||
| sql "drop table if exists dt_rftest_r"; | ||
| sql """ | ||
| CREATE TABLE `dt_rftest_l` ( | ||
| `k1_date_l` DATEV2 | ||
| ) | ||
| DISTRIBUTED BY HASH(`k1_date_l`) buckets 16 | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1" | ||
| ); | ||
| """ | ||
| sql """ | ||
| CREATE TABLE `dt_rftest_r` ( | ||
| `k1_date_r` DATEV2 | ||
| ) | ||
| DISTRIBUTED BY HASH(`k1_date_r`) buckets 16 | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1" | ||
| ); | ||
| """ | ||
| sql """ | ||
| insert into dt_rftest_l values | ||
| ("2001-11-11 11:11:11.123455"), | ||
| ("2011-11-11 11:11:11.123455"), | ||
| ("9999-11-11 11:11:11.123456"); | ||
| """ | ||
| sql """ | ||
| insert into dt_rftest_r values("2011-11-11 11:11:11.123456"); | ||
| """ | ||
| qt_datetime_rf_1_p1 """ | ||
| select /*+SET_VAR(parallel_pipeline_task_num=1)*/ * from dt_rftest_l join dt_rftest_r on k1_date_l = k1_date_r order by 1, 2; | ||
| """ | ||
| qt_datetime_rf_1_p2 """ | ||
| select /*+SET_VAR(parallel_pipeline_task_num=8)*/ * from dt_rftest_l join dt_rftest_r on k1_date_l = k1_date_r order by 1, 2; | ||
| """ | ||
|
|
||
| // test datetime | ||
| sql "drop table if exists dt_rftest_l"; | ||
| sql "drop table if exists dt_rftest_r"; | ||
| sql """ | ||
| CREATE TABLE `dt_rftest_l` ( | ||
| `k1_date_l` DATETIMEV2(6) | ||
| ) | ||
| DISTRIBUTED BY HASH(`k1_date_l`) buckets 16 | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1" | ||
| ); | ||
| """ | ||
| sql """ | ||
| CREATE TABLE `dt_rftest_r` ( | ||
| `k1_date_r` DATETIMEV2(6) | ||
| ) | ||
| DISTRIBUTED BY HASH(`k1_date_r`) buckets 16 | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1" | ||
| ); | ||
| """ | ||
| sql """ | ||
| insert into dt_rftest_l values | ||
| ("2001-11-11 11:11:11.123455"), | ||
| ("2011-11-11 11:11:11.123455"), | ||
| ("9999-11-11 11:11:11.123455"); | ||
| """ | ||
| sql """ | ||
| insert into dt_rftest_r values("2011-11-11 11:11:11.123455"); | ||
| """ | ||
| // RF is different with parallel_pipeline_task_num=1 and parallel_pipeline_task_num=2 | ||
| qt_datetime_rf_2_p1 """ | ||
| select /*+SET_VAR(parallel_pipeline_task_num=1)*/ * from dt_rftest_l join dt_rftest_r on k1_date_l = k1_date_r order by 1, 2; | ||
| """ | ||
| qt_datetime_rf_2_p2 """ | ||
| select /*+SET_VAR(parallel_pipeline_task_num=8)*/ * from dt_rftest_l join dt_rftest_r on k1_date_l = k1_date_r order by 1, 2; | ||
| """ | ||
|
|
||
| sql "drop table if exists dt_rftest_l"; | ||
| sql "drop table if exists dt_rftest_r"; | ||
| sql """ | ||
| CREATE TABLE `dt_rftest_l` ( | ||
| `k1_date` DATEV2 | ||
| ) | ||
| DISTRIBUTED BY HASH(`k1_date`) | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1" | ||
| ); | ||
| """ | ||
| sql """ | ||
| CREATE TABLE `dt_rftest_r` ( | ||
| `k1_char` varchar(64) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rftest_r (string) ---> build hash table (datetimev2(0)) ---> min max (9999-12-31 23:59:59:999999) ---> consumer: liternal (9999-12-31 23:59:59:999999) (datetimev2(0)) |
||
| ) | ||
| DISTRIBUTED BY HASH(`k1_char`) | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1" | ||
| ) | ||
| """ | ||
|
|
||
| sql """ insert into dt_rftest_l values | ||
| ("9999-12-31 23:59:59"); | ||
| """ | ||
| sql """ insert into dt_rftest_r values | ||
| ("9999-12-31 23:59:59.999999"); | ||
| """ | ||
| qt_datetime_rf_3 """ select * from dt_rftest_l join dt_rftest_r on k1_date = k1_char order by 1, 2""" | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table1 probe:
2011-11-11 11:11:11.123456
table2 build:
2011-11-11 11:11:11.123455