Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18411#discussion_r124446861
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala ---
    @@ -68,5 +69,13 @@ private case object OracleDialect extends JdbcDialect {
         case _ => None
       }
     
    +  override def beforeFetch(connection: Connection, properties: Map[String, 
String]): Unit = {
    +    // Set general date and timestamp format before query.
    +    val stmt = connection.createStatement()
    +    stmt.execute("alter session set NLS_DATE_FORMAT = 'YYYY-MM-DD'")
    +    stmt.execute("alter session set NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD 
HH24:MI:SS.FF'")
    --- End diff --
    
    Let me explain it more clearly. ```alter session set NLS_TIMESTAMP_FORMAT = 
'YYYY-MM-DD HH24:MI:SS.FF'``` This will change the timestamp format of the 
connection session. Based on my understanding, `${options.table}` still has to 
follow the format. Before this PR, `${options.table}` is using the default 
format. Thus, after your PR, users are unable to directly migrate their 
workloads to the new version of Spark


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to