Skip to content

HIVE-29481: Fix create table with transactional=false and transactional_properties=insert_only to create a translated to external table#6432

Merged
dengzhhu653 merged 1 commit into
apache:masterfrom
VenuReddy2103:HIVE-29481
Apr 15, 2026

Conversation

@VenuReddy2103
Copy link
Copy Markdown
Contributor

@VenuReddy2103 VenuReddy2103 commented Apr 15, 2026

What changes were proposed in this pull request?

insert_only is meaningful only when transactional is true. Have modified to create a translated to external table when create table has 'transactional'='false','transactional_properties'='insert_only' table properties, making it consistent with following cases:

  1. create table with 'transactional'='false','transactional_properties'='default'
  2. create table with 'transactional'='false'

Why are the changes needed?

When a table is created with 'transactional'='false','transactional_properties'='insert_only' table properties and data is inserted to it, data queries fail.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added new tests

@VenuReddy2103 VenuReddy2103 changed the title WIP: HIVE-29481: Fix create table with transactional=false and transactional_properties=insert_only to create a translated to external table [WIP] HIVE-29481: Fix create table with transactional=false and transactional_properties=insert_only to create a translated to external table Apr 15, 2026
…al_properties=insert_only to create a translated to external table
@sonarqubecloud
Copy link
Copy Markdown

table_params.append("key1=val1");
table_params.append(";");
table_params.append("transactional_properties=insert_only");
table_params.append("transactional=true;transactional_properties=insert_only");
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.

When the table type is managed, do we still need to mention transaction='true' in the table props?

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.

I see, compiler will add this if it is missing. So it makes sense to add transactional property, if we are directly calling metastore client.

Copy link
Copy Markdown
Contributor

@saihemanth-cloudera saihemanth-cloudera left a comment

Choose a reason for hiding this comment

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

LGTM +1

@dengzhhu653 dengzhhu653 merged commit 423fc83 into apache:master Apr 15, 2026
3 of 4 checks passed
@VenuReddy2103 VenuReddy2103 changed the title [WIP] HIVE-29481: Fix create table with transactional=false and transactional_properties=insert_only to create a translated to external table HIVE-29481: Fix create table with transactional=false and transactional_properties=insert_only to create a translated to external table Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants