Skip to content

Conversation

@andygrove
Copy link
Member

@andygrove andygrove commented Jan 2, 2026

Which issue does this PR close?

Closes #.

Rationale for this change

Stop running redundant benchmarks (YEAR, YYYY, YY are all equivalent and do not need to be benchmarked separately)
We no longer want to test with dictionary encoded data because they are always unpacked now

What changes are included in this PR?

Removed redundant format strings:

  • dateTruncExprBenchmark: Reduced from ["YEAR", "YYYY", "YY", "MON", "MONTH", "MM"] to ["YEAR", "MONTH"]
  • timestampTruncExprBenchmark: Reduced from 13 formats to 8: ["YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND", "WEEK", "QUARTER"]

Removed dictionary-encoded benchmarks:

  • Removed the useDictionary parameter from both benchmark methods
  • Removed the dictionary benchmark calls from runCometBenchmark
  • Simplified benchmark names (no longer need the (Dictionary) suffix)

This reduces the total benchmarks from 38 (19 format combinations × 2 dictionary modes) down to 10 benchmarks.

How are these changes tested?

@andygrove andygrove changed the title perf: Improve date/time microbenchmarks perf: Improve date/time microbenchmarks to avoid redundant/duplicate benchmarks Jan 2, 2026
@andygrove andygrove requested a review from comphead January 2, 2026 17:35
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.55%. Comparing base (f09f8af) to head (15d8515).
⚠️ Report is 811 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3020      +/-   ##
============================================
+ Coverage     56.12%   59.55%   +3.43%     
- Complexity      976     1379     +403     
============================================
  Files           119      167      +48     
  Lines         11743    15496    +3753     
  Branches       2251     2569     +318     
============================================
+ Hits           6591     9229    +2638     
- Misses         4012     4970     +958     
- Partials       1140     1297     +157     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@mbutrovich mbutrovich left a comment

Choose a reason for hiding this comment

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

Thanks @andygrove!

}
}

def timestampTruncExprBenchmark(values: Int, useDictionary: Boolean): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there are a lot of tests we could start removing this logic from too.

@andygrove andygrove merged commit af6d335 into apache:main Jan 6, 2026
1 check passed
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.

3 participants