Skip to content

[CALCITE-7347] UNKNOWN type inferred for array element type#4800

Merged
mihaibudiu merged 1 commit intoapache:mainfrom
mihaibudiu:issue7347
Feb 18, 2026
Merged

[CALCITE-7347] UNKNOWN type inferred for array element type#4800
mihaibudiu merged 1 commit intoapache:mainfrom
mihaibudiu:issue7347

Conversation

@mihaibudiu
Copy link
Contributor

The fix is really in considering the least restrictive type of (UNKNOWN, T) as T instead of UNKNOWN.
I think this is a very sensible choice.

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@sonarqubecloud
Copy link


final SqlTypeName typeName = type.getSqlTypeName();
if (typeName == SqlTypeName.NULL) {
if (typeName == SqlTypeName.NULL || typeName == SqlTypeName.UNKNOWN) {
Copy link
Member

Choose a reason for hiding this comment

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

I was going to suggest that this reminded me of typing rules for NULL, and it makes total sense to me

Copy link
Member

@asolimando asolimando left a comment

Choose a reason for hiding this comment

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

LGTM

@mihaibudiu mihaibudiu merged commit df31d6f into apache:main Feb 18, 2026
20 checks passed
@mihaibudiu mihaibudiu deleted the issue7347 branch February 18, 2026 17:25
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

Comments