Github user maropu commented on the pull request: https://github.com/apache/spark/pull/10898#issuecomment-175992128 I found that it's not easy to support this type in postgresql in the current interface of `JdbcDialect`. This is because the `postgresql-jdbc` implementation cannot handle a decimal type name with precision and scale such as `DECIMAL(xx, xx)` in `Connection#createArrayOf`. To fix this issue, we can add a specific entry in `PostgresDialect#getJDBCType` (https://github.com/apache/spark/pull/10898/files#diff-23da60722bc6bfc160cbb59bd99f5925R64). However, this fix makes things worse; `JdbcUtils#schemaString` cannot pass precision and scale for `Decimal` when relation defined in postgresql through `DataFrameWriter`. I'm not sure how to fix this though, it seems okay to just add TODO comments and throw an unsupported exception for this type for the time being. cc: @marmbrus
--- 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