This is an automated email from the ASF dual-hosted git repository.
amoghj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new 57ff27cd10 API: Add exception definitions for scan planning (#14442)
57ff27cd10 is described below
commit 57ff27cd1037d52982428f7efdb5143550bfae56
Author: Amogh Jahagirdar <[email protected]>
AuthorDate: Thu Oct 30 09:25:26 2025 -0600
API: Add exception definitions for scan planning (#14442)
Co-authored-by: Prashant Singh
<[email protected]>
---
.../iceberg/exceptions/NoSuchPlanIdException.java | 38 ++++++++++++++++++++++
.../exceptions/NoSuchPlanTaskException.java | 34 +++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git
a/api/src/main/java/org/apache/iceberg/exceptions/NoSuchPlanIdException.java
b/api/src/main/java/org/apache/iceberg/exceptions/NoSuchPlanIdException.java
new file mode 100644
index 0000000000..bda08b37e1
--- /dev/null
+++ b/api/src/main/java/org/apache/iceberg/exceptions/NoSuchPlanIdException.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.exceptions;
+
+import com.google.errorprone.annotations.FormatMethod;
+
+/**
+ * Exception raised when attempting to fetch scan planning results for a plan
ID that does not
+ * exist.
+ */
+public class NoSuchPlanIdException extends RESTException {
+
+ @FormatMethod
+ public NoSuchPlanIdException(String message, Object... args) {
+ super(message, args);
+ }
+
+ @FormatMethod
+ public NoSuchPlanIdException(Throwable cause, String message, Object...
args) {
+ super(cause, message, args);
+ }
+}
diff --git
a/api/src/main/java/org/apache/iceberg/exceptions/NoSuchPlanTaskException.java
b/api/src/main/java/org/apache/iceberg/exceptions/NoSuchPlanTaskException.java
new file mode 100644
index 0000000000..7218fad15d
--- /dev/null
+++
b/api/src/main/java/org/apache/iceberg/exceptions/NoSuchPlanTaskException.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.exceptions;
+
+import com.google.errorprone.annotations.FormatMethod;
+
+/** Exception thrown when attempting to fetch result tasks for a plan task
that does not exist. */
+public class NoSuchPlanTaskException extends RESTException {
+ @FormatMethod
+ public NoSuchPlanTaskException(String message, Object... args) {
+ super(message, args);
+ }
+
+ @FormatMethod
+ public NoSuchPlanTaskException(Throwable cause, String message, Object...
args) {
+ super(cause, message, args);
+ }
+}