Skip to content

Conversation

@qianheng-aws
Copy link
Contributor

"INTEGER ARRAY");
f.checkScalar("cast(cast('abc' as VARIANT) AS VARCHAR)", "abc", "VARCHAR");
f.checkScalar("cast(cast('abc' as VARIANT) AS CHAR(3))", "abc", "CHAR(3)");
f.checkScalar("cast(cast(2147483648 as VARIANT) as DECIMAL)", "2147483648", "DECIMAL(19, 0)");
Copy link
Member

Choose a reason for hiding this comment

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

I think the bug fix way is OK,but please note:

  1. Your commit message should not contain words like "Fix," and you need to modify the Jira link content to match the PR.
  2. It is recommended to add the corresponding JIRA info to the testCastToBoolean method, or you can add the corresponding comment here.

@rubenada
Copy link
Contributor

@qianheng-aws thanks for the patch. Per our contributing guidelines, when fixing an issue, the Jira/PR title (and the commit message) should describe the problem (and not begin with "Fix ..."), e.g. [CALCITE-7398] Incorrect int cast in VariantNonNull#cast for BIGINT.
Could you please amend it on the Jira, pr and commit message?

@qianheng-aws qianheng-aws changed the title [CALCITE-7398] Fix incorrect cast in VariantNonNull.cast() for BIGINT [CALCITE-7398] Incorrect int cast in VariantNonNull#cast for BIGINT Jan 26, 2026
Signed-off-by: Heng Qian <qianheng@amazon.com>
Copy link
Member

@xuzifu666 xuzifu666 left a comment

Choose a reason for hiding this comment

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

I think the fix is ​​acceptable.

I've encountered this CI error a few times before; it's sporadic and keeps recurring even after multiple reruns. I've documented it on a JIRA: https://issues.apache.org/jira/browse/CALCITE-7399.

This PR has minor changes; if you don't mind, you could resubmit a new pr to make CI happy.

Copy link
Member

@xiedeyantu xiedeyantu left a comment

Choose a reason for hiding this comment

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

LGTM

@xiedeyantu
Copy link
Member

I don't think we need to submit a new PR. This CI error doesn't seem to be related to the PR, so we can merge it in without worry.

@xuzifu666 xuzifu666 added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jan 26, 2026
@xuzifu666
Copy link
Member

I don't think we need to submit a new PR. This CI error doesn't seem to be related to the PR, so we can merge it in without worry.

The CI error is indeed unrelated to changes. If there are no other comments in 24 hours, it will be merged.

@xuzifu666 xuzifu666 merged commit 88fe7d2 into apache:main Jan 27, 2026
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants