aleksandar-trajkovic-db commented on code in PR #59671:
URL: https://github.com/apache/spark/pull/59671#discussion_r4377360090
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala:
##########
@@ -357,7 +357,7 @@ object JdbcUtils extends Logging with SQLConfHelper {
dialect.updateExtraColumnMeta(conn, rsmd, i + 1, metadata)
val columnType =
- dialect.getCatalystType(dataType, typeName, fieldSize,
metadata).getOrElse(
+ dialect.getCatalystType(dataType, typeName, fieldSize, metadata,
options).getOrElse(
Review Comment:
I could, but @milastdbx suggested we should move away from column metadata
in that case, as this decision is not really per-column, but a per-schema
decision, hence the pivot to JdbcOptions and the reason we refactored away the
initial metadata column approach in the first place. I would say this also a
more preferable approach as well. The examples you provided in isTimestampNTZ
and preferTimestampNanos are options pinned into the column metadata from
JdbcOptions and represent an unnecessary intermediate step, as those are also
per-schema and not per-column decisions. I would say this approach sets a good
precedent, as more and more type mappings depend on JdbcOptions
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]