Skip to content

fix external parquet hive partition issue - #24468

Merged
mergify[bot] merged 17 commits into
matrixorigin:mainfrom
iamlinjunhong:m-hive-issue
May 19, 2026
Merged

fix external parquet hive partition issue#24468
mergify[bot] merged 17 commits into
matrixorigin:mainfrom
iamlinjunhong:m-hive-issue

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #24374 #24364 #24370 #24372 #24385 #24375 #24360

What this PR does / why we need it:

fix external parquet hive partition issue

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@aunjgr aunjgr left a comment

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.

Review

Previously flagged issues from #24450 — all fixed ✅

  • uint64→int64 boundary: now uses val > uint64(math.MaxInt64) — correctly rejects 0x8000000000000000.
  • S3 prefetch OOM: maxParquetS3PrefetchSize = 128 MB cap in place; files larger than 128 MB fall back to streaming reads.
  • Page state cleanup on error: page resources are only acquired after successful mapper creation, so pre-allocated empty slices on error paths are harmless.

ALTER TABLE ADD INDEX bypass — not a bug ✅

All three index variants in buildAlterTableInplace (*tree.UniqueIndex at line 4046, *tree.FullTextIndex at line 4101, *tree.Index at line 4158) call checkCreateIndexTableType, so the external-table rejection is properly enforced on ALTER TABLE paths too.

BETWEEN lo > hi → MatchFalse — correct ✅

x BETWEEN a AND b is equivalent to a <= x AND x <= b. When a > b no value can satisfy this, so returning MatchFalse and pruning the partition is the correct SQL-standard behavior.

Minor: no boundary value tests for the two fixed conversions

The new parquet_coverage_test.go doesn't cover:

  • UINT64 = math.MaxInt64 (9223372036854775807) → BIGINT: should succeed
  • UINT64 = math.MaxInt64 + 1 (9223372036854775808) → BIGINT: should error
  • S3 file exactly 128 MB → should prefetch; 128 MB + 1 B → should stream

These are non-blocking but would lock in the fix against regressions. Consider adding them in a follow-up.

LGTM overall.

@mergify mergify Bot added the queued label May 19, 2026
@mergify

mergify Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-05-19 11:21 UTC · Rule: main
  • Checks passed · in-place
  • Merged2026-05-19 13:29 UTC · at c7a337bfec36e73196871705ecd4e3bbe2ff3603 · squash

This pull request spent 2 hours 7 minutes 46 seconds in the queue, including 1 hour 7 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage

@mergify
mergify Bot merged commit 83c9ea1 into matrixorigin:main May 19, 2026
23 of 24 checks passed
@mergify mergify Bot removed the queued label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants