dilipbiswal opened a new pull request #24532: [SPARK-27596] The JDBC 'query' 
option doesn't work for Oracle database
URL: https://github.com/apache/spark/pull/24532
 
 
   ## What changes were proposed in this pull request?
   **Description from JIRA**
   For the JDBC option `query`, we use the identifier name to start with 
underscore: s"(${subquery}) 
_SPARK_GEN_JDBC_SUBQUERY_NAME${curId.getAndIncrement()}". This is not supported 
by Oracle.
   The Oracle doesn't seem to support identifier name to start with 
non-alphabet character (unless it is quoted) and has length restrictions as 
well. 
[link](https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm)
   
   In this PR, the generated alias name 'SPARK_GEN_JDBC_SUBQUERY_NAME<int 
value>' is fixed to remove "_" prefix and also the alias name is shortened to 
not exceed the identifier length limit.
   
   ## How was this patch tested?
   Tests are added for MySql, Postgress, Oracle and DB2 to ensure enough 
coverage.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to