diff options
author | Huaxin Gao <huaxing@us.ibm.com> | 2016-06-16 14:37:10 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-06-16 14:37:10 -0700 |
commit | 62d2fa5e996d428caaea005041b17ec115473762 (patch) | |
tree | 5db6316a136db21af30e47da504a9c34ffacb3b3 /sbin/start-shuffle-service.sh | |
parent | e849285df03b1233d5f647f1b6c5a6dad0665855 (diff) | |
download | spark-62d2fa5e996d428caaea005041b17ec115473762.tar.gz spark-62d2fa5e996d428caaea005041b17ec115473762.tar.bz2 spark-62d2fa5e996d428caaea005041b17ec115473762.zip |
[SPARK-15749][SQL] make the error message more meaningful
## What changes were proposed in this pull request?
For table test1 (C1 varchar (10), C2 varchar (10)), when I insert a row using
```
sqlContext.sql("insert into test1 values ('abc', 'def', 1)")
```
I got error message
```
Exception in thread "main" java.lang.RuntimeException: RelationC1#0,C2#1 JDBCRelation(test1)
requires that the query in the SELECT clause of the INSERT INTO/OVERWRITE statement
generates the same number of columns as its schema.
```
The error message is a little confusing. In my simple insert statement, it doesn't have a SELECT clause.
I will change the error message to a more general one
```
Exception in thread "main" java.lang.RuntimeException: RelationC1#0,C2#1 JDBCRelation(test1)
requires that the data to be inserted have the same number of columns as the target table.
```
## How was this patch tested?
I tested the patch using my simple unit test, but it's a very trivial change and I don't think I need to check in any test.
Author: Huaxin Gao <huaxing@us.ibm.com>
Closes #13492 from huaxingao/spark-15749.
Diffstat (limited to 'sbin/start-shuffle-service.sh')
0 files changed, 0 insertions, 0 deletions