We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77bbcb5 commit c72e214Copy full SHA for c72e214
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala
@@ -60,12 +60,10 @@ private object PostgresDialect extends JdbcDialect {
60
case "bytea" => Some(BinaryType)
61
case "timestamp" | "timestamptz" | "time" | "timetz" => Some(TimestampType)
62
case "date" => Some(DateType)
63
- case "numeric" | "decimal" => if (precision > 0) {
64
- Some(DecimalType.bounded(precision, scale))
65
- } else {
+ case "numeric" | "decimal" if precision > 0 => Some(DecimalType.bounded(precision, scale))
+ case "numeric" | "decimal" =>
66
// SPARK-26538: handle numeric without explicit precision and scale.
67
Some(DecimalType. SYSTEM_DEFAULT)
68
- }
69
case _ => None
70
}
71
0 commit comments