Skip to content

Commit c72e214

Browse files
committed
[SPARK-26538][SQL] follow existing style
1 parent 77bbcb5 commit c72e214

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ private object PostgresDialect extends JdbcDialect {
6060
case "bytea" => Some(BinaryType)
6161
case "timestamp" | "timestamptz" | "time" | "timetz" => Some(TimestampType)
6262
case "date" => Some(DateType)
63-
case "numeric" | "decimal" => if (precision > 0) {
64-
Some(DecimalType.bounded(precision, scale))
65-
} else {
63+
case "numeric" | "decimal" if precision > 0 => Some(DecimalType.bounded(precision, scale))
64+
case "numeric" | "decimal" =>
6665
// SPARK-26538: handle numeric without explicit precision and scale.
6766
Some(DecimalType. SYSTEM_DEFAULT)
68-
}
6967
case _ => None
7068
}
7169

0 commit comments

Comments
 (0)