Skip to content

HIVE-28886: CalcitePlanner throws NullPointerException when column name case in ColumnStatisticsObj differs from the table schema - #5763

Merged
deniskuzZ merged 2 commits into
apache:masterfrom
deniskuzZ:HIVE-28886
Apr 12, 2025
Merged

Conversation

@deniskuzZ

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Transform the column name in ColumnStatsObj to lowercase

Why are the changes needed?

NullPointerException Fix

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

q test

…me case in ColumnStatisticsObj differs from the table schema
List<Object> values) throws HiveException {
ColumnStatisticsObj statsObj = new ColumnStatisticsObj();
statsObj.setColName(columnName);
statsObj.setColName(columnName.toLowerCase());

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.

How this fix the lower case? Somewhere is a compare the column name and in other places could be capital?

@deniskuzZdeniskuzZApr 10, 2025

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

it's always lowercased in Hive schema, but not in ColumnStatisticsObj

@SourabhBadhyaSourabhBadhya left a comment

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.

LGTM +1 (pending tests)

@sonarqubecloud

Copy link
Copy Markdown

@deniskuzZ
deniskuzZ merged commit aacbe29 into apache:masterApr 12, 2025
@deniskuzZ
deniskuzZ deleted the HIVE-28886 branch April 12, 2025 10:06
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@deniskuzZ@aturoczy@kasakrisz@SourabhBadhya@asf-ci-hive