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

Upgrade calcite to 1.37.0 #16504

Merged
merged 68 commits into from
Jun 13, 2024
Merged

Conversation

kgyrtkirk
Copy link
Member

  • contains Make a full copy of the parser and apply our modifications to it #16503
  • some minor api changes pair/entry
  • some unnecessary aggregation was removed from a set of queries in CalciteSubqueryTest
  • AliasedOperatorConversion was detecting CHAR_LENGTH as not a function ; I've removed the check
    • the field it was using doesn't look maintained that much
    • the kind is passed for the created SqlFunction so I don't think this check is actually needed
  • some decoupled test cases become broken - will be fixed later
  • some aggregate related changes
  • CalciteQueryTest#testExactCountDistinctWithFilter is now executable

I recommend to turn on whitespace ignore while taking a look at the changes

@github-actions github-actions bot added Area - Batch Ingestion Area - Querying Area - Dependencies Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels May 28, 2024
Copy link
Contributor

@imply-cheddar imply-cheddar left a comment

Choose a reason for hiding this comment

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

It looks like there are a few cases where a filtered agg has moved to be an aggregation on top of a virtual column. There's a risk that the change could end up as a performance regression, do we know why those plans have changed?

Aside from that, this seems to be all green and the bulk of the changes are in adding the parser.jj rather than actual changes. So, I'm going ahead and pushing approve, but also think it's worth at least explaining why those SQL plans changed.

Copy link
Contributor

@imply-cheddar imply-cheddar left a comment

Choose a reason for hiding this comment

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

Actually, it's not all green, not sure what I was thinking. So marking this as request changes just to make it all green. The current failure seems to be a test expectation mismatch (expected 2 got 5?).

The core set of things in this PR make sense to me though, so I think it's just getting to all green checks

Copy link
Member Author

@kgyrtkirk kgyrtkirk left a comment

Choose a reason for hiding this comment

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

there was a result mismatch when default values were used

.setVirtualColumns(
expressionVirtualColumn(
"v0",
"case_searched((\"dim1\" != '1'),1,0)",
Copy link
Member Author

Choose a reason for hiding this comment

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

this CASE statement was retained because the transformation to COUNT may change behaviour when there are 0 input rows;
I've some ideas how to fix this - but didn't got to it yet

Copy link
Contributor

@imply-cheddar imply-cheddar left a comment

Choose a reason for hiding this comment

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

Okay, it looks like it should turn green now, approving assuming it's all green.

@kgyrtkirk kgyrtkirk merged commit ac19b14 into apache:master Jun 13, 2024
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Batch Ingestion Area - Dependencies Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Area - Querying
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants