Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/11063#discussion_r53750162
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
---
@@ -306,6 +327,24 @@ class JDBCSuite extends SparkFunSuite
.collect().length === 3)
}
+ test("Partioning on column that might have null values.") {
+ assert(
+ sqlContext.read.jdbc(urlWithUserAndPass, "TEST.EMP", "theid", 0, 4,
3, new Properties)
+ .collect().length === 4)
+ assert(
+ sqlContext.read.jdbc(urlWithUserAndPass, "TEST.EMP", "THEID", 0, 4,
3, new Properties)
+ .collect().length === 4)
+ // partitioning on a nullable quoted column
+ assert(
+ sqlContext.read.jdbc(urlWithUserAndPass, "TEST.EMP", """"Dept"""",
0, 4, 3, new Properties)
+ .collect().length === 4)
+ }
+
+ test("SELECT * on partitioned table with a nullable partioncolumn") {
+ assert(sql("SELECT * FROM nullparts").collect().size == 4)
+ }
+
--- End diff --
remove the extra blank line here
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]