-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add support for TopN and aggregation pushdown in Elasticsearch #23118
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
base: master
Are you sure you want to change the base?
Add support for TopN and aggregation pushdown in Elasticsearch #23118
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Murthy Chelankuri.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Murthy Chelankuri.
|
f75d92c
to
2935da8
Compare
Can we split the TopN and aggregation pushdown as a separate commit, this would make the reviews a bit easier |
public TopN addSortItem(TopNSortItem sortItem) | ||
{ | ||
topNSortItems.add(sortItem); | ||
return this; | ||
} |
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.
It is always a bit recommended to make the object TopN
immutable instead of changing its state here
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.
Thanks @Praveen2112 for the feed back. removed this method and made TopN as immutable.
SUPPORTS_COMMENT_ON_COLUMN, | ||
SUPPORTS_COMMENT_ON_TABLE, | ||
SUPPORTS_CREATE_MATERIALIZED_VIEW, | ||
SUPPORTS_CREATE_SCHEMA, | ||
SUPPORTS_CREATE_TABLE, | ||
SUPPORTS_CREATE_VIEW, | ||
SUPPORTS_DELETE, | ||
SUPPORTS_INSERT, | ||
SUPPORTS_MERGE, | ||
SUPPORTS_RENAME_COLUMN, | ||
SUPPORTS_RENAME_TABLE, | ||
SUPPORTS_ROW_TYPE, | ||
SUPPORTS_SET_COLUMN_TYPE, | ||
SUPPORTS_UPDATE -> false; | ||
case SUPPORTS_LIMIT_PUSHDOWN, | ||
SUPPORTS_TOPN_PUSHDOWN, | ||
SUPPORTS_AGGREGATION_PUSHDOWN -> true; |
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.
Can we revert back the indentations ?
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.
Thanks @Praveen2112 for the feedback reverted the indentations.
"SELECT " + | ||
"text_column " + | ||
"FROM " + indexName + " " + | ||
"WHERE text_column LIKE 's_.m%ex\\t'")) |
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.
Can we revert the indentations ?
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.
I am not see any issue with indentation on my editor. Just compared with the previous version i don't see any change in the indentation. Can you please check once ?
OptionalLong limit) | ||
List<TermAggregation> termAggregations, | ||
List<MetricAggregation> metricAggregations, | ||
Optional<TopN> topN) |
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.
Instead of maintaining TopN
which maintains limit
as well - Can we have an Optional<List<SortOrder>>
if the list is present we could consider it as TopN
else Limit
- But we need to handle what if TopN
-> Limit
and otherway around
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.
@Praveen2112 , can we keep the topN instead of splitting two arguments Optional<List> and limit? But if that is what we need to do, we can look into changing accordingly.
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time. |
c85c5eb
to
02c2107
Compare
This pull request has gone a while without any activity. Tagging for triage help: @mosabua |
Added stale-ignore labels since I think @murthy-chelankuri is wanting to continue work on this .. do you know what your next steps are @murthy-chelankuri or do you need help from reviewers? |
You need to rebase this PR @murthy-chelankuri to proceed .. it is currently not reviewable |
13032b5
to
02c2107
Compare
Thank you @murthy-chelankuri for building this! Any more updates on this? |
Description
This pull request adds support for pushing down TopN and Aggregation to Elasticsearch.
Additional context and related issues
Opening a new merge request because the previous one was automatically closed for being stale, and we couldn't reopen the stale pull request.
#16919
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: