Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OracleSchemaHelper extends SchemaHelper {
override protected def toTTypeDesc(sqlType: Int, precision: Int, scale: Int): TTypeDesc = {
sqlType match {
// case for int, returns NUMERIC type in Oracle JDBC
case Types.NUMERIC if scale == 0 =>
case Types.NUMERIC if scale == 0 && (precision > 0 && precision <= 9) =>
super.toTTypeDesc(Types.INTEGER, precision, scale)
// except for int
case Types.NUMERIC =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ class OracleTRowSetGenerator extends DefaultJdbcTRowSetGenerator {
}

override def getColumnType(schema: Seq[Column], ordinal: Int): Int = {
schema(ordinal).sqlType match {
val col = schema(ordinal)
col.sqlType match {
// case for int, returns NUMERIC type in Oracle JDBC
case Types.NUMERIC if schema(ordinal).scale == 0 =>
case Types.NUMERIC if col.scale == 0 && (col.precision > 0 && col.precision <= 9) =>
Types.INTEGER
case Types.NUMERIC =>
Types.DECIMAL
Expand Down
Loading