Skip to content

Commit f2c2fc4

Browse files
committed
Merge apache/main into normalize-float-comparison-operands
# Conflicts: # native/core/src/execution/planner.rs # spark/src/test/scala/org/apache/comet/CometFloatSemanticsSuite.scala
2 parents 36546d0 + 8a7e664 commit f2c2fc4

166 files changed

Lines changed: 12904 additions & 1127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.ai/skills/review-comet-iceberg-write-pr/SKILL.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ only the latest.
123123

124124
## 4. Failure Handling and Cleanup
125125

126-
Files must have exactly one owner at every moment. Read the ownership table in the contributor
127-
guide before reviewing any change near `AbortOnDrop`, `TrackingLocationGenerator`,
128-
`WrittenFileCleanup`, `drainNativePayload` or `IcebergCommitExec.collectAndCommit`.
126+
Cleanup must never have an ownership gap. During the handoff, native remains armed until the JVM
127+
has taken the locations and acknowledged that by polling EOF, so a brief overlap is intentional.
128+
Read the ownership table in the contributor guide before reviewing any change near `AbortOnDrop`,
129+
`TrackingLocationGenerator`, `WrittenFileCleanup`, `drainNativePayload` or
130+
`IcebergCommitExec.collectAndCommit`.
129131

130132
- [ ] A new failure point between writing a file and the JVM taking the locations is covered by the
131133
native guard, including the path where the plan is dropped mid-write rather than returning an

‎.github/actions/maven-bootstrap/action.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ description: >-
2727
# single request has failed with HTTP 403 and 429 often enough to matter.
2828
# Every job that runs ./mvnw (directly, via make, or via setup-spark-builder)
2929
# goes through setup-builder or setup-macos-builder, which end by calling this
30-
# action; ci.yml's preflight job calls it directly before the RAT check.
30+
# action.
3131
#
3232
# Requires a checkout and a JDK on PATH. Runs from the repository root.
3333

‎.github/workflows/README.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,13 @@ before any test has started. Once `Required Checks` is a required context
499499
which is why plain network flakes are worth retrying rather than re-running
500500
the whole pipeline by hand.
501501

502+
**Source license check.** `preflight` creates an unsigned source tarball from
503+
the checked-out commit and runs the same RAT script and exclusion list used to
504+
create a release candidate. `dev/release/create-source-tarball.sh` is shared by
505+
CI and `create-tarball.sh`, so CI checks the files that will actually ship
506+
rather than maintaining a separate Maven RAT configuration. `make rat` runs
507+
the same check locally against `HEAD`.
508+
502509
**Maven wrapper bootstrap.** `./mvnw` downloads the Maven distribution itself on
503510
a cold runner, and a blip from `repo.maven.apache.org` fails the job before
504511
anything is compiled. `./.github/actions/maven-bootstrap` caches that
@@ -510,10 +517,9 @@ bootstrap, never compilation or test execution.
510517
`./.github/actions/setup-builder` and `./.github/actions/setup-macos-builder`
511518
run it as their last step, once the JDK is on PATH, so every job that goes
512519
through either of them is covered without a step of its own; that includes
513-
the `java-test`, `rust-test` and `setup-spark-builder` callers. `preflight` in
514-
`ci.yml` uses no setup action and calls it directly before the RAT check. A
515-
new job that runs `./mvnw` without going through a setup action needs the
516-
step before its first Maven use.
520+
the `java-test`, `rust-test` and `setup-spark-builder` callers. A new job that
521+
runs `./mvnw` without going through a setup action needs the step before its
522+
first Maven use.
517523

518524
## Merge queue
519525

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,8 @@ jobs:
141141
distribution: temurin
142142
java-version: 17
143143

144-
# Preflight gates every other job, so a single failed download of the
145-
# Maven distribution here would fail the whole run.
146-
- name: Bootstrap Maven
147-
uses: ./.github/actions/maven-bootstrap
148-
149144
- name: Apache RAT license check
150-
run: ./mvnw -B -N apache-rat:check
145+
run: ./dev/release/check-rat.sh HEAD
151146

152147
- name: Setup Node.js
153148
uses: actions/setup-node@v7
@@ -190,6 +185,9 @@ jobs:
190185
- name: Check missing suites
191186
run: python3 dev/ci/check-suites.py
192187

188+
- name: Check versioned source parity
189+
run: python3 dev/ci/check-versioned-source-parity.py
190+
193191
- name: Check micro benchmark runner
194192
run: python3 dev/ci/check-benchmark-runner.py
195193

‎.github/workflows/pr_build_linux.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,16 @@ jobs:
510510
org.apache.comet.exec.CometAggregateSuite
511511
org.apache.comet.exec.CometExec3_4PlusSuite
512512
org.apache.comet.exec.CometExecSuite
513+
org.apache.comet.exec.CometMergeRowsSuite
513514
org.apache.comet.exec.CometTopKSuite
514515
org.apache.comet.exec.CometEmptyRelationExecSuite
515516
org.apache.comet.exec.CometRangeExecSuite
516517
org.apache.comet.exec.CometInMemoryCacheSuite
517518
org.apache.comet.exec.CometInMemoryCachePruningSuite
518519
org.apache.comet.exec.CometInMemoryCacheKryoSuite
520+
org.apache.comet.exec.CometInMemoryCacheKryoUnregisteredSuite
521+
org.apache.comet.exec.CometInMemoryCacheKryoClassesToRegisterSuite
522+
org.apache.comet.exec.CometInMemoryCacheLastAttemptMetricSuite
519523
org.apache.comet.exec.CometGenerateExecSuite
520524
org.apache.comet.exec.CometWindowExecSuite
521525
org.apache.comet.exec.CometJoinSuite
@@ -572,6 +576,7 @@ jobs:
572576
org.apache.spark.sql.CometSortCollationSuite
573577
org.apache.comet.CometFuzzAggregateSuite
574578
org.apache.spark.sql.comet.execution.arrow.CometArrowStreamSuite
579+
org.apache.spark.sql.comet.execution.arrow.CometArrowWriterSuite
575580
org.apache.spark.sql.comet.execution.arrow.CometStringWriterSuite
576581
org.apache.spark.sql.CometSparkInternalFunctionsSuite
577582
- name: "expressions"

‎.github/workflows/pr_build_macos.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,16 @@ jobs:
214214
org.apache.comet.exec.CometAggregateSuite
215215
org.apache.comet.exec.CometExec3_4PlusSuite
216216
org.apache.comet.exec.CometExecSuite
217+
org.apache.comet.exec.CometMergeRowsSuite
217218
org.apache.comet.exec.CometTopKSuite
218219
org.apache.comet.exec.CometEmptyRelationExecSuite
219220
org.apache.comet.exec.CometRangeExecSuite
220221
org.apache.comet.exec.CometInMemoryCacheSuite
221222
org.apache.comet.exec.CometInMemoryCachePruningSuite
222223
org.apache.comet.exec.CometInMemoryCacheKryoSuite
224+
org.apache.comet.exec.CometInMemoryCacheKryoUnregisteredSuite
225+
org.apache.comet.exec.CometInMemoryCacheKryoClassesToRegisterSuite
226+
org.apache.comet.exec.CometInMemoryCacheLastAttemptMetricSuite
223227
org.apache.comet.exec.CometGenerateExecSuite
224228
org.apache.comet.exec.CometWindowExecSuite
225229
org.apache.comet.exec.CometJoinSuite
@@ -276,6 +280,7 @@ jobs:
276280
org.apache.spark.sql.CometSortCollationSuite
277281
org.apache.comet.CometFuzzAggregateSuite
278282
org.apache.spark.sql.comet.execution.arrow.CometArrowStreamSuite
283+
org.apache.spark.sql.comet.execution.arrow.CometArrowWriterSuite
279284
org.apache.spark.sql.comet.execution.arrow.CometStringWriterSuite
280285
org.apache.spark.sql.CometSparkInternalFunctionsSuite
281286
- name: "expressions"

‎.github/workflows/pyarrow_udf_test.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
spark/src/test/resources/pyspark/test_pyarrow_udf.py
104104
/tmp/venv/bin/python -m pytest -v \
105105
spark/src/test/resources/pyspark/test_pyarrow_udf_dictionary_shuffle.py
106+
/tmp/venv/bin/python -m pytest -v \
107+
spark/src/test/resources/pyspark/test_pyarrow_udf_fuzz.py
106108
107109
# Saved only on main: an entry written from a pull request or a
108110
# `gh-readonly-queue/*` branch cannot be restored by any later run, and

‎Makefile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
.PHONY: all core jvm test clean release-linux release bench print-benchmark-args
18+
.PHONY: all core jvm test clean rat release-linux release bench print-benchmark-args
1919

2020
define spark_jvm_17_extra_args
2121
$(shell ./mvnw help:evaluate -q -DforceStdout -Dexpression=extraJavaTestArgs $(PROFILES))
@@ -53,6 +53,8 @@ clean:
5353
cd native && cargo clean
5454
./mvnw clean $(PROFILES)
5555
rm -rf .dist
56+
rat:
57+
./dev/release/check-rat.sh HEAD
5658
bench:
5759
cd native && RUSTFLAGS="-Ctarget-cpu=native" cargo bench $(FEATURES_ARG) $(filter-out $@,$(MAKECMDGOALS))
5860
format:
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
from pathlib import Path
19+
20+
PARITY_GROUPS = [
21+
(
22+
"MergeRows serializer",
23+
[
24+
Path("spark/src/main/spark-3.5/org/apache/comet/serde/operator/CometMergeRows.scala"),
25+
Path("spark/src/main/spark-4.0/org/apache/comet/serde/operator/CometMergeRows.scala"),
26+
],
27+
"Spark 3.5 and 4.0 intentionally share the same MergeRows serialization contract.",
28+
),
29+
(
30+
"MergeRows registration shim",
31+
[
32+
Path("spark/src/main/spark-3.5/org/apache/comet/shims/ShimCometMergeRows.scala"),
33+
Path("spark/src/main/spark-4.0/org/apache/comet/shims/ShimCometMergeRows.scala"),
34+
],
35+
"Spark 3.5 and 4.0 intentionally register MergeRows through identical shims.",
36+
),
37+
(
38+
"MergeRows metrics shim without semantic counters",
39+
[
40+
Path("spark/src/main/spark-3.x/org/apache/comet/shims/MergeRowsMetricsShim.scala"),
41+
Path("spark/src/main/spark-4.0/org/apache/comet/shims/MergeRowsMetricsShim.scala"),
42+
],
43+
"Spark 3.x and 4.0 do not publish semantic MergeRows counters.",
44+
),
45+
]
46+
47+
48+
def main() -> int:
49+
failed = False
50+
for name, paths, reason in PARITY_GROUPS:
51+
reference = paths[0].read_bytes()
52+
for path in paths[1:]:
53+
if path.read_bytes() != reference:
54+
failed = True
55+
print(f"{name} files must remain byte-identical.")
56+
print(f"Reason: {reason}")
57+
print(f"Reference: {paths[0]}")
58+
print(f"Different: {path}")
59+
if failed:
60+
return 1
61+
62+
print("Versioned source parity checks passed.")
63+
return 0
64+
65+
66+
if __name__ == "__main__":
67+
raise SystemExit(main())

‎dev/ci/compute-changes.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
"spark/src/main/spark-4.x/org/apache/spark/sql/execution/python/CometArrowPythonRunnerBase.scala",
162162
"spark/src/test/resources/pyspark/conftest.py",
163163
"spark/src/test/resources/pyspark/test_pyarrow_udf.py",
164+
"spark/src/test/resources/pyspark/test_pyarrow_udf_fuzz.py",
164165
"spark/src/test/resources/pyspark/test_pyarrow_udf_dictionary_shuffle.py",
165166
"spark/src/test/spark-3.5/org/apache/spark/sql/comet/CometMapInBatchSuite.scala",
166167
"spark/src/test/spark-4.x/org/apache/spark/sql/comet/CometMapInBatchSuite.scala",

0 commit comments

Comments
 (0)