You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by vi...@apache.org on 2022/11/16 20:29:44 UTC
[spark] branch master updated: [SPARK-41155][SQL] Add error message to SchemaColumnConvertNotSupportedException
This is an automated email from the ASF dual-hosted git repository.
viirya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 26839b70768 [SPARK-41155][SQL] Add error message to SchemaColumnConvertNotSupportedException
26839b70768 is described below
commit 26839b7076864bd80e49d60c309b63da85c0422d
Author: Liang-Chi Hsieh <vi...@gmail.com>
AuthorDate: Wed Nov 16 12:29:09 2022 -0800
[SPARK-41155][SQL] Add error message to SchemaColumnConvertNotSupportedException
### What changes were proposed in this pull request?
This patch adds error message to `SchemaColumnConvertNotSupportedException`.
### Why are the changes needed?
Just found the fact that `SchemaColumnConvertNotSupportedException` doesn't have any error message is annoying for debugging.
In stack trace, we only see `SchemaColumnConvertNotSupportedException` but don't know what column is wrong.
After this change, we should be able to see it, e.g.,
```
org.apache.spark.sql.execution.datasources.SchemaColumnConvertNotSupportedException: column: [_1], physicalType: INT32, logicalType: bigint
```
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
Closes #38669 from viirya/add_error_message.
Authored-by: Liang-Chi Hsieh <vi...@gmail.com>
Signed-off-by: Liang-Chi Hsieh <vi...@gmail.com>
---
.../datasources/SchemaColumnConvertNotSupportedException.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/SchemaColumnConvertNotSupportedException.java b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/SchemaColumnConvertNotSupportedException.java
index 7d1fbe64fc9..b7ff0c26a9d 100644
--- a/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/SchemaColumnConvertNotSupportedException.java
+++ b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/SchemaColumnConvertNotSupportedException.java
@@ -54,7 +54,8 @@ public class SchemaColumnConvertNotSupportedException extends RuntimeException {
String column,
String physicalType,
String logicalType) {
- super();
+ super("column: " + column + ", physicalType: " + physicalType +
+ ", logicalType: " + logicalType);
this.column = column;
this.physicalType = physicalType;
this.logicalType = logicalType;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org