Skip to content

[HUDI-7978][DOCS] Add a note on field oldering in partitioned by clause of create sql#11610

Merged
nsivabalan merged 2 commits intoapache:asf-sitefrom
codope:HUDI-7978-docs
Jul 11, 2024
Merged

[HUDI-7978][DOCS] Add a note on field oldering in partitioned by clause of create sql#11610
nsivabalan merged 2 commits intoapache:asf-sitefrom
codope:HUDI-7978-docs

Conversation

@codope
Copy link
Member

@codope codope commented Jul 10, 2024

Change Logs

If we specify partition fields in an order different from the order in create table schema, then query does not fail and the whole partitioning is incorrect. This has been an issue even in 0.15 and 0.14. We will fix this in HUDI-7964. Meanwhile, it's important we update the docs.

Impact

Docs improvement.

Risk level (write none, low medium or high below)

low

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@github-actions github-actions bot added docs size:S PR with lines of changes in (10, 100] labels Jul 10, 2024
You can also create a table partitioned by multiple fields by supplying comma-separated field names.
When creating a table partitioned by multiple fields, ensure that you specify the columns in the `PARTITIONED BY` clause
in the same order as they appear in the `CREATE TABLE` schema. For example, for the above table, the partition fields
should be specified as `PARTITIONED BY (dt, hh)`.
Copy link
Contributor

Choose a reason for hiding this comment

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

is it not an issue in older versions? or we have sql_ddl page only from 0.14.x

Copy link
Member Author

Choose a reason for hiding this comment

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

I could not find sql ddl docs in earlier version but later realized this was part of quickstart itself. Tested back till 0.10, which error out, but other versions create table and insert data in incorrect partition. Updated the PR.

@nsivabalan nsivabalan merged commit 488438f into apache:asf-site Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants