Skip to content

[CALCITE-6968] SqlUpdate#getOperandList omits sourceSelect operand#4857

Open
macroguo-ghy wants to merge 1 commit intoapache:mainfrom
macroguo-ghy:calcite-6968
Open

[CALCITE-6968] SqlUpdate#getOperandList omits sourceSelect operand#4857
macroguo-ghy wants to merge 1 commit intoapache:mainfrom
macroguo-ghy:calcite-6968

Conversation

@macroguo-ghy
Copy link
Copy Markdown
Contributor

@macroguo-ghy macroguo-ghy commented Mar 30, 2026

Jira Link

CALCITE-6968

Changes Proposed

  • Fix SqlUpdate so its operand contract consistently includes the internal sourceSelect across getOperandList(), setOperand(), and OPERATOR.createCall(...).
  • Add regression coverage for operand symmetry, cloning, and unparse() behavior so the internal sourceSelect remains internal.

Copy link
Copy Markdown
Member

@caicancai caicancai left a comment

Choose a reason for hiding this comment

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

There is only one question

operands[3],
null,
(SqlIdentifier) operands[4]);
(SqlSelect) operands[4],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are there any cases where it cannot be converted to SQLSelect?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

According to the SqlOperator's definition, its operands must be consistent with SqlCall.

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