You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2017/02/02 19:53:10 UTC

[GitHub] spark pull request #16733: [SPARK-19392][SQL] Fix the bug that throws an exc...

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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