Skip to content

Fix NPE when checking is materialized hive view#18800

Closed
jinyangli34 wants to merge 1 commit intotrinodb:masterfrom
jinyangli34:jinyang-fix_npe_on_hive_view
Closed

Fix NPE when checking is materialized hive view#18800
jinyangli34 wants to merge 1 commit intotrinodb:masterfrom
jinyangli34:jinyang-fix_npe_on_hive_view

Conversation

@jinyangli34
Copy link
Copy Markdown
Contributor

@jinyangli34 jinyangli34 commented Aug 24, 2023

Description

Fix NPE when Hive view's table_comment not exists

Additional context and related issues

Fixes #18799

Release notes

(x) Release notes are required, with the following suggested text:

# Hive
* Fix failure when reading Hive views. ({issue}`18799`)

@cla-bot cla-bot bot added the cla-signed label Aug 24, 2023
@github-actions github-actions bot added tests:hive hive Hive connector labels Aug 24, 2023
return tableType.equals(VIRTUAL_VIEW.name()) &&
"true".equals(tableParameters.get(PRESTO_VIEW_FLAG)) &&
tableParameters.get(TABLE_COMMENT).equalsIgnoreCase(ICEBERG_MATERIALIZED_VIEW_COMMENT);
ICEBERG_MATERIALIZED_VIEW_COMMENT.equalsIgnoreCase(tableParameters.get(TABLE_COMMENT));
Copy link
Copy Markdown
Member

@ebyhr ebyhr Aug 24, 2023

Choose a reason for hiding this comment

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

Is it possible to add a test?

Don't we need to fix isTrinoView method as well?

return tableType.equals(VIRTUAL_VIEW.name()) &&
"true".equals(tableParameters.get(PRESTO_VIEW_FLAG)) &&
tableParameters.get(TABLE_COMMENT).equalsIgnoreCase(ICEBERG_MATERIALIZED_VIEW_COMMENT);
ICEBERG_MATERIALIZED_VIEW_COMMENT.equalsIgnoreCase(tableParameters.get(TABLE_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.

@ebyhr
Copy link
Copy Markdown
Member

ebyhr commented Aug 31, 2023

Superseded by #18876. Thanks for your contribution.

@ebyhr ebyhr closed this Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed hive Hive connector

Development

Successfully merging this pull request may close these issues.

NPE when reading hive view

3 participants