You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Siva Gudavalli (JIRA)" <ji...@apache.org> on 2015/11/24 16:12:10 UTC
[jira] [Created] (SPARK-11953) CLONE - Sparksql-1.4.1
DataFrameWrite.jdbc() SaveMode.Append Bug
Siva Gudavalli created SPARK-11953:
--------------------------------------
Summary: CLONE - Sparksql-1.4.1 DataFrameWrite.jdbc() SaveMode.Append Bug
Key: SPARK-11953
URL: https://issues.apache.org/jira/browse/SPARK-11953
Project: Spark
Issue Type: Bug
Components: Java API, Spark Submit, SQL
Affects Versions: 1.4.1, 1.5.1
Environment: Spark stand alone cluster
Reporter: Siva Gudavalli
I am running spark-submit in window 8.1 with spark standalone cluster (01 worker and 01 master), the job throw Exception in DataFrameWrite.jdbc(..) scala function.
We found that the following test:
var tableExists = JdbcUtils.tableExists(conn, table)
always return false event if we already created a table.
That drive the function to do creating table from specified DataFrame and the SQL Syntax error for creating table, we locate the SQL execution statement hereafter:
if (!tableExists) {
val schema = JDBCWriteDetails.schemaString(df, url)
val sql = s"CREATE TABLE $table ($schema)"
conn.prepareStatement(sql).executeUpdate() // This execution cause sql syntax error
}
This happened with spark-1.4.1 and Spark-1.5.1 (our dev environment).
Please help!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org