Skip to content

Commit 6172a0c

Browse files
committed
Merge remote-tracking branch 'apache/main' into feature/array-position
2 parents c66024e + d9ed85f commit 6172a0c

840 files changed

Lines changed: 12360 additions & 7345 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.

.github/workflows/iceberg_spark_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ on:
4848

4949
env:
5050
RUST_VERSION: stable
51+
RUST_BACKTRACE: 1
5152

5253
jobs:
5354
# Build native library once and share with all test jobs

.github/workflows/miri.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,14 @@ on:
2828
- "native/core/benches/**"
2929
- "native/spark-expr/benches/**"
3030
- "spark/src/test/scala/org/apache/spark/sql/benchmark/**"
31-
# Disabled until Miri compatibility is restored
32-
# https://github.com/apache/datafusion-comet/issues/3499
33-
# pull_request:
34-
# paths-ignore:
35-
# - "doc/**"
36-
# - "docs/**"
37-
# - "**.md"
38-
# - "native/core/benches/**"
39-
# - "native/spark-expr/benches/**"
40-
# - "spark/src/test/scala/org/apache/spark/sql/benchmark/**"
31+
pull_request:
32+
paths-ignore:
33+
- "doc/**"
34+
- "docs/**"
35+
- "**.md"
36+
- "native/core/benches/**"
37+
- "native/spark-expr/benches/**"
38+
- "spark/src/test/scala/org/apache/spark/sql/benchmark/**"
4139
# manual trigger
4240
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
4341
workflow_dispatch:

.github/workflows/pr_benchmark_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ on:
4141

4242
env:
4343
RUST_VERSION: stable
44+
RUST_BACKTRACE: 1
4445

4546
jobs:
4647
benchmark-check:

.github/workflows/pr_build_linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ on:
4848

4949
env:
5050
RUST_VERSION: stable
51+
RUST_BACKTRACE: 1
5152

5253
jobs:
5354

.github/workflows/pr_build_macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ on:
4848

4949
env:
5050
RUST_VERSION: stable
51+
RUST_BACKTRACE: 1
5152

5253
jobs:
5354

.github/workflows/pr_rat_check.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
name: RAT License Check
19+
20+
concurrency:
21+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
24+
permissions:
25+
contents: read
26+
27+
# No paths-ignore: this workflow must run for ALL changes including docs
28+
on:
29+
push:
30+
branches:
31+
- main
32+
pull_request:
33+
workflow_dispatch:
34+
35+
jobs:
36+
rat-check:
37+
name: RAT License Check
38+
runs-on: ubuntu-slim
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Set up Java
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: temurin
45+
java-version: 11
46+
- name: Run RAT check
47+
run: ./mvnw -B -N apache-rat:check

.github/workflows/spark_sql_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ on:
5454

5555
env:
5656
RUST_VERSION: stable
57+
RUST_BACKTRACE: 1
5758

5859
jobs:
5960

.github/workflows/spark_sql_test_native_datafusion.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828

2929
env:
3030
RUST_VERSION: stable
31+
RUST_BACKTRACE: 1
3132

3233
jobs:
3334
spark-sql-catalyst-native-datafusion:

.github/workflows/spark_sql_test_native_iceberg_compat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828

2929
env:
3030
RUST_VERSION: stable
31+
RUST_BACKTRACE: 1
3132

3233
jobs:
3334
spark-sql-catalyst-native-iceberg-compat:
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package org.apache.comet.exceptions;
21+
22+
import org.apache.comet.CometNativeException;
23+
24+
/**
25+
* Exception thrown from Comet native execution containing JSON-encoded error information. The
26+
* message contains a JSON object with the following structure:
27+
*
28+
* <pre>
29+
* {
30+
* "errorType": "DivideByZero",
31+
* "errorClass": "DIVIDE_BY_ZERO",
32+
* "params": { ... },
33+
* "context": { "sqlText": "...", "startOffset": 0, "stopOffset": 10 },
34+
* "hint": "Use `try_divide` to tolerate divisor being 0"
35+
* }
36+
* </pre>
37+
*
38+
* CometExecIterator parses this JSON and converts it to the appropriate Spark exception by calling
39+
* the corresponding QueryExecutionErrors.* method.
40+
*/
41+
public final class CometQueryExecutionException extends CometNativeException {
42+
43+
/**
44+
* Creates a new CometQueryExecutionException with a JSON-encoded error message.
45+
*
46+
* @param jsonMessage JSON string containing error information
47+
*/
48+
public CometQueryExecutionException(String jsonMessage) {
49+
super(jsonMessage);
50+
}
51+
52+
/**
53+
* Returns true if the message appears to be JSON-formatted. This is used to distinguish between
54+
* JSON-encoded errors and legacy error messages.
55+
*
56+
* @return true if message starts with '{' and ends with '}'
57+
*/
58+
public boolean isJsonMessage() {
59+
String msg = getMessage();
60+
if (msg == null) return false;
61+
String trimmed = msg.trim();
62+
return trimmed.startsWith("{") && trimmed.endsWith("}");
63+
}
64+
}

0 commit comments

Comments
 (0)