Github user taroplus commented on a diff in the pull request:
https://github.com/apache/spark/pull/19548#discussion_r146160051
--- Diff:
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala
---
@@ -307,4 +315,32 @@ class OracleIntegrationSuite extends
DockerJDBCIntegrationSuite with SharedSQLCo
assert(values.getInt(1).equals(1))
assert(values.getBoolean(2).equals(false))
}
+
+ test("SPARK-22303: handle BINARY_DOUBLE and BINARY_FLOAT as DoubleType
and FloatType") {
+ val tableName = "oracle_types"
+ val schema = StructType(Seq(
+ StructField("d", DoubleType, true),
+ StructField("f", FloatType, true)))
+ val props = new Properties()
+
+ // write it back to the table (append mode)
+ val data = spark.sparkContext.parallelize(Seq(Row(1.1D, 2.2F)))
--- End diff --
updated
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]