chore: rebase Greptime thin fork onto DataFusion 54.1 - #21
Closed
discord9 wants to merge 14 commits into
Closed
Conversation
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 7303323)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 467e7ec)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit c349e4b)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 9297b40)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 557ddad)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit e2be639)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit d385af8)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit fb7b26d)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 0273585)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 0f6dcb1)
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit cee35d9)
Signed-off-by: discord9 <discord9@163.com>
10 tasks
Ports GreptimeTeam/datafusion PR #22 (commit aa6f9fa) onto the 54.1 thin fork. regex_match_dyn_scalar re-materialized the evaluated dictionary values with take_iter, which discarded the validity of the evaluated values array. Use arrow::compute::take so NULLs from both the dictionary keys and the evaluated values are preserved, matching plain utf8 regex evaluation. Signed-off-by: discord9 <discord9@163.com>
Ports GreptimeTeam/datafusion PR #23 (source commit f2a0b22) onto the 54.1 thin fork. Ordered comparisons (>=, <, >, <=) over a coarse-to-fine timestamp widening cast now rewrite to a source-domain bound: >= and < use ceil, > and <= use floor, computed with i128 div_euclid/rem_euclid for both aligned and non-aligned target literals (aligned values collapse to the common bound). The rewrite is limited to coarse->fine timestamp units with identical timezone metadata and a target-typed non-NULL literal; it does not extend to equality/IN, timezone changes, or other cast families. Overflow policy: the ordered source bound is equivalent only for source values whose widening is representable. In line with the accepted DF53 fork PR #23 policy, this fork also applies the rewrite outside that domain, where regular CAST can error and TRY_CAST can return NULL. No full-domain equivalence is claimed. Preserved protections: equality/IN, typed NULL, timezone mismatch, dictionary, and non-default physical cast options / target field metadata all retain the cast. Signed-off-by: discord9 <discord9@163.com>
Author
|
Closing per decision: GreptimeDB will consume the org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A — issues are disabled on this maintenance fork. This replacement is tracked by GreptimeDB PR #8555 and supersedes GreptimeTeam/datafusion#20.
Rationale for this change
GreptimeDB is upgrading from its DataFusion 53.1 maintenance branch to DataFusion 54.1. The first thin-fork proposal (#20) was built on official 54.0.0. Since then, official 54.1.0 shipped 20 backports, including an adapted version of the volatile file-scan projection fix that #20 carried locally.
This replacement starts from the exact official
54.1.0commit0d1f2ebe2cc97c91b736bc0a160b5b73cf40437a, drops the now-upstream volatile projection patch, and carries only the correctness fixes still required by GreptimeDB. It keeps the organization branch reviewable instead of making the official 54.1 update appear as part of a PR based ongreptimedb-54.0.0.What changes are included in this PR?
Base:
Retained fixes, replayed with provenance from the validated 54.0 stack:
7303323513a60023a3a467e7ec99fe5cfcc3a8c349e4b388062d818d9array_resizeby Arrow's maximum array size9297b40fd4e4231af92557ddad236a286efa5dSortPreservingMergeExece2be63976c4b31e11d0d385af852d33f4161e7TRY_CASTscalar/array overflow behavior nullablefb7b26d04c218a14c53027358559b887df12d5median(NULL)and fall back from grouped accumulation0f6dcb128d450ac6b5cee35d94c33e6bb173ORDER BYrequirements belowScalarSubqueryExecroots9eae6da6f43a6b5750aa6f9fa05b1f616b1df2a0b22e4d75a5582aExplicitly not replayed:
adfae3451— official 54.1 contains the adapted fix asc735a49a3.The resulting candidate head is
d75a5582a7112e11bf2f36449f47fd60ac820a05, exactly 14 commits above the official 54.1 base.Overflow policy disclosure (GreptimeTeam #23)
The ordered timestamp-widening rewrite introduced in
d75a5582ais applied with the same accepted fork policy as the merged DF53 PR #23: the ordered source bound is exactly equivalent only for source values whose widening is representable. Outside that domain a regularCASTcan error andTRY_CASTcan returnNULL, while the rewrite still emits the source-domain predicate. No full-domain equivalence is claimed; the commit message anddatafusion/expr-common/src/casts.rsdocument this trade-off.Are these changes tested?
Each retained semantic change has focused regression coverage from the original test-first port. The 54.1 replacement additionally requires:
0d1f2ebe2;cargo clippy --all-targets --all-features -- -D warnings;Actual completed evidence before submission:
0d1f2ebe2and an exact 14-commit range.b1f616b1,d75a5582).cargo clippy --all-targets --all-features -- -D warnings.datafusion-physical-optimizerClippy.simplify_expr.slt, full all-featuredatafusion-expr-common/datafusion-optimizer/datafusion-physical-exprsuites with 0 failures,cargo fmt --all -- --check, and full-workspacecargo clippy --all-targets --all-features -- -D warnings(0 warnings).