Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mihaibudiu
Copy link
Contributor

Fixes #5425
Fixes #5484

Signed-off-by: Mihai Budiu <[email protected]>
…type in an INTERSECT operation

Signed-off-by: Mihai Budiu <[email protected]>
@mihaibudiu mihaibudiu requested review from Copilot and rivudhk January 22, 2026 06:01
@mihaibudiu mihaibudiu enabled auto-merge January 22, 2026 06:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Calcite version and fixes type conversion issues in INTERSECT operations by ensuring all input types are properly converted to the result type.

Changes:

  • Advances the Calcite commit to version ea08b43db6bc83ea76678bd77873e110083c0edc
  • Refactors INTERSECT operation handling to convert input types to the result type during indexing
  • Adds regression tests for issues #5425 (DESCRIPTOR with array indexing) and #5484 (INTERSECT with user-defined types)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
calcite_version.env Updates the Calcite commit hash to the next version
Regression2Tests.java Adds two new regression tests for the fixed issues
CalciteToDBSPCompiler.java Refactors INTERSECT logic by extracting indexEntireTuple method and converting input types to result type during indexing

Comment on lines +2383 to +2384
/** Given an operator with output type ZSet[T], index is using
* (ZSet[S], Tup0). */
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

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

The documentation comment is unclear. It should explain that this method indexes a ZSet by its entire tuple as the key, converting from input type S to result type T, and producing an indexed ZSet with an empty value tuple (Tup0).

Suggested change
/** Given an operator with output type ZSet[T], index is using
* (ZSet[S], Tup0). */
/**
* Given an operator whose output is a {@code ZSet<S>}, create an indexed ZSet that
* uses the entire tuple as the key and an empty tuple ({@code Tup0}) as the value.
* <p>
* The input tuples of type {@code S} are cast to {@code resultType} (type {@code T})
* and used as the key type of the resulting {@code IndexedZSet<T, Tup0>}.
*/

Copilot uses AI. Check for mistakes.
@Test
public void issue5425() {
this.statementsFailingInCompilation("""
CREATE TABLE tbl(
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

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

Extra space between 'TABLE' and 'tbl' should be removed.

Suggested change
CREATE TABLE tbl(
CREATE TABLE tbl(

Copilot uses AI. Check for mistakes.
@mihaibudiu mihaibudiu added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 020d7ef Jan 22, 2026
6 of 7 checks passed
@mihaibudiu mihaibudiu deleted the issue5425 branch January 22, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants