Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ public boolean hasCol() {
}

public String getColumnName() {
if (subColPath != null && !subColPath.isEmpty()) {
return col + "." + String.join(".", subColPath);
}
return col;
}

Expand Down
12 changes: 12 additions & 0 deletions regression-test/data/variant_p0/sql/rewrite_or_to_in.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !rewrite_or_to_in --
0

-- !rewrite_or_to_in_2 --
DeleteEvent megan777/calculator 2021-01-02T16:37:26Z
DeleteEvent megan777/calculator 2021-01-02T16:37:26Z
DeleteEvent megan777/calculator 2021-01-02T16:37:27Z
PushEvent megan777/calculator 2021-01-02T16:39:09Z
CreateEvent megan777/calculator 2021-01-02T16:39:41Z
PullRequestEvent megan777/calculator 2021-01-02T16:39:41Z

6 changes: 6 additions & 0 deletions regression-test/suites/variant_p0/sql/rewrite_or_to_in.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set rewrite_or_to_in_predicate_threshold = 2;
select
cast(v:type as string), cast(v:repo.name as string), cast(v:created_at as string)
from ghdata
where cast(v:type as string) = 'Delete' or cast(v:repo.name as string) = 'megan777/calculator' or cast(v:created_as as string) = '2021-01-02T16:37:26Z'
order by k limit 10;