allisonwang-db commented on code in PR #43784:
URL: https://github.com/apache/spark/pull/43784#discussion_r1393381350
##########
python/pyspark/sql/tests/test_python_datasource.py:
##########
@@ -118,25 +118,26 @@ def reader(self, schema) -> "DataSourceReader":
self.spark.dataSource.register(JsonDataSource)
path1 = os.path.join(SPARK_HOME, "python/test_support/sql/people.json")
- path2 = os.path.join(SPARK_HOME,
"python/test_support/sql/people1.json")
+ # path2 = os.path.join(SPARK_HOME,
"python/test_support/sql/people1.json")
df1 = self.spark.read.format("my-json").load(path1)
self.assertEqual(df1.rdd.getNumPartitions(), 1)
assertDataFrameEqual(
df1,
[Row(name="Michael", age=None), Row(name="Andy", age=30),
Row(name="Justin", age=19)],
)
- df2 = self.spark.read.format("my-json").load([path1, path2])
- self.assertEqual(df2.rdd.getNumPartitions(), 2)
- assertDataFrameEqual(
- df2,
- [
- Row(name="Michael", age=None),
- Row(name="Andy", age=30),
- Row(name="Justin", age=19),
- Row(name="Jonathan", age=None),
- ],
- )
+ # Multiple paths are now allowed in DSv1, see SPARK-45597
Review Comment:
But it looks like we can support multiple paths in V1?
https://github.com/apache/spark/blob/f8ccf20360dfc5f8f7152d4b8588af680c5a988e/sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala#L253-L268
Or can we support multiple paths, using this method?
https://github.com/apache/spark/blob/f8ccf20360dfc5f8f7152d4b8588af680c5a988e/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Utils.scala#L155-L166
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]