cloud-fan commented on code in PR #48625:
URL: https://github.com/apache/spark/pull/48625#discussion_r1815226652
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala:
##########
@@ -382,18 +382,21 @@ private case class PostgresDialect()
case Types.ARRAY =>
val tableName = rsmd.getTableName(columnIdx)
val columnName = rsmd.getColumnName(columnIdx)
- val query =
+ val query = if (conf.postgresProperReadingOfArrayDimensionality) {
+ s"SELECT array_ndims($columnName)) FROM $tableName LIMIT 1"
+ } else {
s"""
|SELECT pg_attribute.attndims
|FROM pg_attribute
Review Comment:
interesting, let's leave a code comment here to explain it.
--
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]