Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[SPARK-26538][SQL] follow existing style
  • Loading branch information
a-shkarupin committed Jan 10, 2019
commit c72e2149bc421019692bf028784d2bd511b9e11c
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ private object PostgresDialect extends JdbcDialect {
case "bytea" => Some(BinaryType)
case "timestamp" | "timestamptz" | "time" | "timetz" => Some(TimestampType)
case "date" => Some(DateType)
case "numeric" | "decimal" => if (precision > 0) {
Some(DecimalType.bounded(precision, scale))
} else {
case "numeric" | "decimal" if precision > 0 => Some(DecimalType.bounded(precision, scale))
case "numeric" | "decimal" =>
// SPARK-26538: handle numeric without explicit precision and scale.
Some(DecimalType. SYSTEM_DEFAULT)
}
case _ => None
}

Expand Down