Skip to content

[CALCITE-6300] Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType not equals map Biggest mapKeytype or mapValueType#4853

Open
caicancai wants to merge 2 commits intoapache:mainfrom
caicancai:6300
Open

Conversation

@caicancai
Copy link
Copy Markdown
Member

@caicancai caicancai commented Mar 27, 2026

…auleType and mapKeyType not equals map Biggest mapKeytype or mapValueType
@caicancai
Copy link
Copy Markdown
Member Author

caicancai commented Mar 27, 2026

@mihaibudiu Let's fix this problem completely. I will continue to follow up on this.

if (operandTypes.get(i).getSqlTypeName()
!= targetType.getSqlTypeName()) {
call.setOperand(i,
SqlStdOperatorTable.CAST.createCall(SqlParserPos.ZERO,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The newly created cast node will not have a type in the typemap. You have to insert it there as well.

@sonarqubecloud
Copy link
Copy Markdown

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