Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Incomplete
-
2.0.0, 2.1.0
-
None
Description
The issue was caused by SPARK-16387 where reserved SQL words are honored by wrapping quotes on column names.
In our test we found that when quotes are explicitly wrapped in column names then Oracle JDBC driver is throwing :
java.sql.BatchUpdateException: ORA-01741: illegal zero-length identifier
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:12296)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:246)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:597)
and Cassandra JDBC driver is throwing :
17/04/12 19:03:48 ERROR executor.Executor: Exception in task 0.0 in stage 5.0 (TID 6)
java.sql.SQLSyntaxErrorException: [FMWGEN][Cassandra JDBC Driver][Cassandra]syntax error or access rule violation: base table or view not found:
at weblogic.jdbc.cassandrabase.ddcl.b(Unknown Source)
at weblogic.jdbc.cassandrabase.ddt.a(Unknown Source)
at weblogic.jdbc.cassandrabase.BaseConnection.prepareStatement(Unknown Source)
at weblogic.jdbc.cassandrabase.BaseConnection.prepareStatement(Unknown Source)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.insertStatement(JdbcUtils.scala:118)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:571)