Skip to content

[CALCITE-7696] Simplify window PARTITION BY and ORDER BY keys in RelBuilder - #5165

Open
xuzifu666 wants to merge 2 commits into
apache:mainfrom
xuzifu666:em_opt
Open

[CALCITE-7696] Simplify window PARTITION BY and ORDER BY keys in RelBuilder#5165
xuzifu666 wants to merge 2 commits into
apache:mainfrom
xuzifu666:em_opt

Conversation

@xuzifu666

Copy link
Copy Markdown
Member

* references fixed columns and is dropped, leaving {@code ORDER BY z}. */
private ImmutableList<RexFieldCollation> simplifySortKeys(
List<RexNode> partitionKeys, List<RexFieldCollation> sortKeys) {
// A RANGE frame with a value offset (e.g. RANGE BETWEEN 5 PRECEDING)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

which test covers this case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you for pointing out, I had added a test testProjectOverRangeOffsetKeepsSortKey to cover it. The new test would fail without the following modification.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants