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

[CALCITE-6735] Type coercion for comparisons does not coerce ROW types #4096

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

mihaibudiu
Copy link
Contributor

I also had to implement in the RexToLixTranslator casts between ROW types.

@mihaibudiu
Copy link
Contributor Author

The CI seems finished, just not detected properly by the UI.

@mihaibudiu
Copy link
Contributor Author

In practical terms, what this PR does is to convert a comparison of ROW values with different types to a common type using casts.

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
assert sourceType.getSqlTypeName() == SqlTypeName.ROW;
List<RelDataTypeField> targetTypes = targetType.getFieldList();
List<RelDataTypeField> sourceTypes = sourceType.getFieldList();
assert targetTypes.size() == sourceTypes.size();
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to judge this? The sizes of targettype and sourcetype may be different?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The validator will reject such programs.

@mihaibudiu mihaibudiu merged commit 424f667 into apache:main Dec 19, 2024
20 checks passed
@mihaibudiu mihaibudiu deleted the issue6735 branch December 19, 2024 18:13
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.

3 participants