Repository navigation
allow optimizing sql expressions and virtual columns #12241
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
Changes from all commits
f247942
5c899d2
cd81e8f
f29befa
53af183
90fd30c
f53b46b
c5505eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -564,7 +564,7 @@ public void testDoublesSketchPostAggs() throws Exception | |
| ), | ||
| new ExpressionPostAggregator( | ||
| "p3", | ||
| "(p2 + 1000)", | ||
| "(\"p2\" + 1000)", | ||
|
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. Naive question, but is this test change indicative of a change in what SQL is required to be written? I.e. might some things that didn't require quotes previously suddenly require quotes?
Member
Author
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. no, I think it was potentially a bug that the identifiers were not always being escaped in expression post-aggs, that has been fixed by the changes in how we build the native string expressions. humans are still allowed to reference identifiers without the double quotes, just the expressions we generate from SQL will always be escaped with them |
||
| null, | ||
| TestExprMacroTable.INSTANCE | ||
| ), | ||
|
|
@@ -578,7 +578,7 @@ public void testDoublesSketchPostAggs() throws Exception | |
| ), | ||
| new ExpressionPostAggregator( | ||
| "p6", | ||
| "(p5 + 1000)", | ||
| "(\"p5\" + 1000)", | ||
| null, | ||
| TestExprMacroTable.INSTANCE | ||
| ), | ||
|
|
@@ -590,7 +590,7 @@ public void testDoublesSketchPostAggs() throws Exception | |
| ), | ||
| 0.5f | ||
| ), | ||
| new ExpressionPostAggregator("p9", "abs(p8)", null, TestExprMacroTable.INSTANCE), | ||
| new ExpressionPostAggregator("p9", "abs(\"p8\")", null, TestExprMacroTable.INSTANCE), | ||
| new DoublesSketchToQuantilesPostAggregator( | ||
| "p11", | ||
| new FieldAccessPostAggregator( | ||
|
|
@@ -633,7 +633,7 @@ public void testDoublesSketchPostAggs() throws Exception | |
| ), | ||
| new ExpressionPostAggregator( | ||
| "p20", | ||
| "replace(replace(p19,'HeapCompactDoublesSketch','HeapUpdateDoublesSketch')," | ||
| "replace(replace(\"p19\",'HeapCompactDoublesSketch','HeapUpdateDoublesSketch')," | ||
| + "'Combined Buffer Capacity : 6'," | ||
| + "'Combined Buffer Capacity : 8')", | ||
| null, | ||
|
|
||
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.
this pattern is done in a few places, and i think could be done more efficiently, but I avoided changing the logic at this point to reduce the number of moving parts since this PR has become a bit large