Skip to content
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

support for WindowSegment #26038

Merged
merged 5 commits into from
Jun 12, 2023
Merged

Conversation

kanha-gupta
Copy link
Contributor

@kanha-gupta kanha-gupta commented Jun 3, 2023

Ref #24200
support for caseID:
1.select_group_by_with_having_and_window

Changes proposed in this pull request:

  1. Added support for Window segment through Calcite method call
  2. there is a constructor added in WindowSegment.java file to prevent errors caused by File usages

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

@kanha-gupta
Copy link
Contributor Author

@strongduanmu Please review, is the approach good ?
this caseID is also for PostgreSQL & OpenGauss which I will optimise after you approve the Approach and code.
Thank you :)

@RaigorJiang
Copy link
Contributor

Hi @kanha-gupta
Please fix the file conflict, thank you!

@kanha-gupta
Copy link
Contributor Author

@strongduanmu @RaigorJiang Please review.
Conflict and CI errors are resolved now :)

return new IdentifierValue(ctx.colId().identifier().getText());
}

private Collection<ExpressionSegment> getWindowSpecification(final WindowSpecificationContext ctx) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kanha-gupta, can you add sql parse test case for new visit logic?

Copy link
Contributor Author

@kanha-gupta kanha-gupta Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sir, I have added sql parse test case in the new xml file for Mysql, PostgreSQL & opengauss.
is there any other test to add ?

@kanha-gupta
Copy link
Contributor Author

@strongduanmu Please review again, changes are made :)

}

private Collection<ExpressionSegment> getWindowSpecification(final WindowSpecificationContext ctx) {
Collection<ExpressionSegment> result = createInsertValuesSegments(ctx.partitionClause().exprList());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kanha-gupta, why call createInsertValuesSegments method in getWindowSpecification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sir, thank you for the review :) createInsertValuesSegments method Gives desired Result for exprList() processing therefore I call that method instead of writing code for it.
Is the approach good or Should I write new code for it ?
Thank you

@boyjoy1127
Copy link
Contributor

Will this issue be completed before June 15 which is the final date of version 5.4.0?

Copy link
Member

@strongduanmu strongduanmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kanha-gupta Thank you for your outstanding work.

@strongduanmu strongduanmu merged commit e6ed692 into apache:master Jun 12, 2023
@kanha-gupta
Copy link
Contributor Author

@kanha-gupta Thank you for your outstanding work.

Thanks a lot sir :)

iamhucong pushed a commit to iamhucong/shardingsphere that referenced this pull request Jun 12, 2023
* support for WindowSegment

* corrections

* refactoring window segment
@kanha-gupta kanha-gupta deleted the windowSegment branch June 12, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants