Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16733#discussion_r99202768
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala 
---
    @@ -726,11 +726,14 @@ class JDBCSuite extends SparkFunSuite
     
       test("OracleDialect jdbc type mapping") {
         val oracleDialect = JdbcDialects.get("jdbc:oracle")
    -    val metadata = new MetadataBuilder().putString("name", 
"test_column").putLong("scale", -127)
    -    assert(oracleDialect.getCatalystType(java.sql.Types.NUMERIC, "float", 
1, metadata) ==
    -      Some(DecimalType(DecimalType.MAX_PRECISION, 10)))
         assert(oracleDialect.getCatalystType(java.sql.Types.NUMERIC, 
"numeric", 0, null) ==
           Some(DecimalType(DecimalType.MAX_PRECISION, 10)))
    +    val metadata1 = new MetadataBuilder()
    --- End diff --
    
    Could you explain the scenario that could build an empty metadata and pass 
it to `getCatalystType`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to