Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Native] Fix table writer to use the actual storage format #23923

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

kewang1024
Copy link
Collaborator

@kewang1024 kewang1024 commented Oct 31, 2024

Coordinator decides data storage format in following logic:

  1. Unpartitioned table use table format
  2. Partitioned table
    • use table format if respect-table-format is set to true
    • use hive.storage-format if respect-table-format is false

The final decision is stored in actualStorageFormat of
HiveOutputTableHandle. Switch to use actualStorageFormat
for prestissimo.

tableStorageFormat and partitionStorageFormat in
HiveOutputTableHandle would be deprecated later.

== NO RELEASE NOTE ==

Use `actualStorageFormat` because storage format decision is
already made, having duplicate logic in HiveWriterFactory could
result in bug.

Also getTableStorageFormat and getPartitionStorageFormat API
will be deprecated from HiveWritableTableHandle
What storage format would be used is decided in coordinator and
passed in by actualStorageFormat.

tableStorageFormat and partitionStorageFormat would be
deprecated
@kewang1024 kewang1024 requested review from a team as code owners October 31, 2024 06:07
@kewang1024 kewang1024 requested a review from presto-oss October 31, 2024 06:07
@kewang1024 kewang1024 changed the title Fix storage format [Native] Fix table writer to use the actual storage format Oct 31, 2024
Copy link
Contributor

@amitkdutta amitkdutta left a comment

Choose a reason for hiding this comment

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

Thanks @kewang1024

@amitkdutta amitkdutta merged commit 68aea2f into prestodb:master Oct 31, 2024
60 checks passed
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 9, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 11, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 11, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 11, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 12, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 12, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Nov 12, 2024
This is followup e2e test for prestodb#23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit that referenced this pull request Nov 12, 2024
This is followup e2e test for #23923

For a partitioned table, when respect_table_format is set to false,
and table_format and hive_storage_format is different, the newly
added partition should use hive_storage_format.
kewang1024 added a commit to kewang1024/presto that referenced this pull request Dec 10, 2024
prestodb#23923 fixed the create handle.
As a follwup, also fix the InsertHandle
xiaoxmeng pushed a commit that referenced this pull request Dec 10, 2024
#23923 fixed the create handle.
As a follwup, also fix the InsertHandle
denodo-research-labs pushed a commit to denodo-research-labs/presto that referenced this pull request Dec 12, 2024
prestodb#23923 fixed the create handle.
As a follwup, also fix the InsertHandle
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.

5 participants