Skip to content

[HUDI-8586] Allow partition stats only for primitive types#12350

Merged
codope merged 1 commit intoapache:masterfrom
codope:hudi-8586-part-stats-data-types
Nov 29, 2024
Merged

[HUDI-8586] Allow partition stats only for primitive types#12350
codope merged 1 commit intoapache:masterfrom
codope:hudi-8586-part-stats-data-types

Conversation

@codope
Copy link
Member

@codope codope commented Nov 27, 2024

Change Logs

  • Allow partition stats only for certain data types
  • Make column stats a pre-requisite for partition stats

Impact

Partition stats correctness

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 the size:S PR with lines of changes in (10, 100] label Nov 27, 2024
@codope codope force-pushed the hudi-8586-part-stats-data-types branch from 80dbf13 to 1393a72 Compare November 28, 2024 12:24
@codope codope changed the title [HUDI-8586][WIP] Allow partition stats only for primitive types [HUDI-8586] Allow partition stats only for primitive types Nov 28, 2024
@codope codope marked this pull request as ready for review November 28, 2024 12:25
@github-actions github-actions bot added size:M PR with lines of changes in (100, 300] and removed size:S PR with lines of changes in (10, 100] labels Nov 28, 2024
Copy link
Contributor

@nsivabalan nsivabalan left a comment

Choose a reason for hiding this comment

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

given my review

if ((fieldSchema.getType() == Schema.Type.INT || fieldSchema.getType() == Schema.Type.LONG)
&& fieldSchema.getLogicalType() != null) {

// Skip fields with logical types DATE or TIME_MILLIS for INT, TIMESTAMP_MILLIS for LONG
Copy link
Contributor

Choose a reason for hiding this comment

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

how did you arrive at this?

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 was checking the timestamop based logical types in avro - https://avro.apache.org/docs/1.11.0/spec.html#Logical+Types

ensure colstats enabled and fix logical types and add test

address comments and fix some tests

fix more tests

fix testSecondaryIndexWithPartitionStatsIndex
@codope codope force-pushed the hudi-8586-part-stats-data-types branch from c0f57c1 to 126bde5 Compare November 29, 2024 10:42
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@codope codope merged commit 039ccc0 into apache:master Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M PR with lines of changes in (100, 300]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants