-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Bug] Fix some bugs(rewrite rule/symbol transport) of like predicate
#8770
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
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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
50 changes: 0 additions & 50 deletions
50
fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteLikePredicateRule.java
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| insert into test_basic_agg values(0,0,0,0,0,'0',0,0,0,0,0); |
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| CREATE TABLE `test_basic_agg` ( | ||
| `k1` tinyint(4) NULL COMMENT "", | ||
| `k2` smallint(6) NULL COMMENT "", | ||
| `k3` int(11) NULL COMMENT "", | ||
| `k4` bigint(20) NULL COMMENT "", | ||
| `k5` decimal(9, 3) NULL COMMENT "", | ||
| `k6` char(5) NULL COMMENT "", | ||
| `k10` date NULL COMMENT "", | ||
| `k11` datetime NULL COMMENT "", | ||
| `k7` varchar(20) NULL COMMENT "", | ||
| `k8` double MAX NULL COMMENT "", | ||
| `k9` float SUM NULL COMMENT "" | ||
| ) ENGINE=OLAP | ||
| AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`) | ||
| COMMENT "OLAP" | ||
| PARTITION BY RANGE(`k1`) | ||
| (PARTITION p1 VALUES [("-128"), ("-64")), | ||
| PARTITION p2 VALUES [("-64"), ("0")), | ||
| PARTITION p3 VALUES [("0"), ("64")), | ||
| PARTITION p4 VALUES [("64"), (MAXVALUE))) | ||
| DISTRIBUTED BY HASH(`k1`) BUCKETS 5 | ||
| PROPERTIES ( | ||
| "replication_allocation" = "tag.location.default: 1", | ||
| "in_memory" = "false", | ||
| "storage_format" = "V2" | ||
| ); |
21 changes: 21 additions & 0 deletions
21
regression-test/data/correctness/test_select_with_predicate_like.out
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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| -- This file is automatically generated. You should know what you did if you want to edit this | ||
| -- !select_default -- | ||
| 1 | ||
|
|
||
| -- !select_default2 -- | ||
| 1 | ||
|
|
||
| -- !select_default3 -- | ||
|
|
||
| -- !select_default4 -- | ||
|
|
||
| -- !select_default -- | ||
| 1 | ||
|
|
||
| -- !select_default2 -- | ||
| 1 | ||
|
|
||
| -- !select_default3 -- | ||
|
|
||
| -- !select_default4 -- | ||
|
|
19 changes: 18 additions & 1 deletion
19
regression-test/suites/correctness/test_select_constant.groovy
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 |
|---|---|---|
| @@ -1,3 +1,20 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| suite("test_select_constant") { | ||
| qt_select1 'select 100, "test", date("2021-01-02")' | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
regression-test/suites/correctness/test_select_with_predicate_like.groovy
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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
| suite("test_select_with_predicate_like") { | ||
| def tables=["test_basic_agg"] | ||
|
|
||
| for (String table in tables) { | ||
| sql """drop table if exists ${table};""" | ||
| sql new File("""regression-test/common/table/${table}.sql""").text | ||
| sql new File("""regression-test/common/load/${table}.sql""").text | ||
| } | ||
|
|
||
|
|
||
| qt_select_default "select 1 from test_basic_agg where 1998 like '1%';" | ||
| qt_select_default2 "select 1 from test_basic_agg where '1998' like '1%';" | ||
| qt_select_default3 "select 1 from test_basic_agg where 2998 like '1%';" | ||
| qt_select_default4 "select 1 from test_basic_agg where '2998' like '1%';" | ||
| qt_select_default "select 1 from test_basic_agg where 199.8 like '1%';" | ||
| qt_select_default2 "select 1 from test_basic_agg where '199.8' like '1%';" | ||
| qt_select_default3 "select 1 from test_basic_agg where 299.8 like '1%';" | ||
| qt_select_default4 "select 1 from test_basic_agg where '299.8' like '1%';" | ||
| } |
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
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
17 changes: 17 additions & 0 deletions
17
regression-test/suites/demo/select_union_all_action.groovy
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.