Skip to content

Commit 4f485a3

Browse files
Merge branch 'apache:main' into main
2 parents 65e2b52 + 6db3bfb commit 4f485a3

828 files changed

Lines changed: 13053 additions & 6610 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/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ jobs:
4545
persist-credentials: false
4646

4747
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4
48+
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
4949
with:
5050
languages: actions
5151

5252
- name: Perform CodeQL Analysis
53-
uses: github/codeql-action/analyze@c793b717bc78562f491db7b0e93a3a178b099162 # v4
53+
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
5454
with:
5555
category: "/language:actions"

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ jobs:
6262
- name: Echo Comet version
6363
run: echo "The current Comet version is ${{ env.COMET_VERSION }}"
6464
- name: Set up Docker Buildx
65-
uses: docker/setup-buildx-action@v3
65+
uses: docker/setup-buildx-action@v4
6666
- name: Login to GitHub Container Registry
67-
uses: docker/login-action@v3
67+
uses: docker/login-action@v4
6868
with:
6969
registry: ghcr.io
7070
username: ${{ github.actor }}
7171
password: ${{ secrets.GITHUB_TOKEN }}
7272
- name: Build and push
73-
uses: docker/build-push-action@v6
73+
uses: docker/build-push-action@v7
7474
with:
7575
platforms: linux/amd64,linux/arm64
7676
push: true

.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/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/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)