Add pushdown for statistical aggregate functions to MySQL connector#6673
Merged
findepi merged 1 commit intotrinodb:masterfrom Jan 27, 2021
Merged
Conversation
findepi
reviewed
Jan 22, 2021
Comment on lines
61
to
62
Member
There was a problem hiding this comment.
JdbcColumnHandle columnHandle = (JdbcColumnHandle) context.getAssignment(input.getName());
findepi
reviewed
Jan 22, 2021
Member
There was a problem hiding this comment.
that's already checked for in the pattern
findepi
reviewed
Jan 22, 2021
Member
There was a problem hiding this comment.
can you pleasee rebase on top of #6667 ?
this line would need to be changed to
Suggested change
| format("stddev_samp(%s)", columnHandle.toSqlExpression(context.getIdentifierQuote())), | |
| format("stddev_samp(%s)", context.getIdentifierQuote().apply(columnHandle.getColumnName())), |
322edb3 to
905170d
Compare
findepi
reviewed
Jan 25, 2021
Member
There was a problem hiding this comment.
stddev is an alias, so
- rename this class to
ImplementStddevSamp - add
// TODO (https://github.com/trinodb/trino/issues/6189): remove stddev, an alias, from the list & simplify the pattern
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlIntegrationSmokeTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlIntegrationSmokeTest.java
Outdated
Show resolved
Hide resolved
905170d to
be71572
Compare
be71572 to
72a40aa
Compare
Member
Author
|
@findepi Please merge if you think this version is OK. |
findepi
reviewed
Jan 27, 2021
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/ImplementStddevSamp.java
Show resolved
Hide resolved
findepi
approved these changes
Jan 27, 2021
| public Pattern<AggregateFunction> getPattern() | ||
| { | ||
| return basicAggregation() | ||
| .with(functionName().matching(name -> STDDEV_FUNCTION_NAMES.stream().anyMatch(name::equalsIgnoreCase))) |
Member
There was a problem hiding this comment.
this can be ever better
Suggested change
| .with(functionName().matching(name -> STDDEV_FUNCTION_NAMES.stream().anyMatch(name::equalsIgnoreCase))) | |
| .with(functionName().matching(name -> "stddev". equalsIgnoreCase(name) || "stddev_samp". equalsIgnoreCase(name)) |
Member
|
@MiguelWeezardo can you please follow up with docs update? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.