dongjoon-hyun commented on code in PR #36069:
URL: https://github.com/apache/spark/pull/36069#discussion_r847663964
##########
examples/src/main/python/sql/datasource.py:
##########
@@ -28,12 +28,25 @@
def generic_file_source_options_example(spark: SparkSession) -> None:
# $example on:ignore_corrupt_files$
- # enable ignore corrupt files
+ # enable ignore corrupt files via the data source option
+ # dir1/file3.json is corrupt from parquet's view
+ test_corrupt_df0 = spark.read.option("ignoreCorruptFiles", "true")\
+ .parquet("examples/src/main/resources/dir1/",
+ "examples/src/main/resources/dir1/dir2/")
+ test_corrupt_df0.show()
+ # +-------------+
+ # | file|
+ # +-------------+
+ # |file1.parquet|
+ # |file2.parquet|
+ # +-------------+
+
+ # enable ignore corrupt files via the configuration
spark.sql("set spark.sql.files.ignoreCorruptFiles=true")
# dir1/file3.json is corrupt from parquet's view
- test_corrupt_df = spark.read.parquet("examples/src/main/resources/dir1/",
+ test_corrupt_df1 = spark.read.parquet("examples/src/main/resources/dir1/",
"examples/src/main/resources/dir1/dir2/")
Review Comment:
Hi, @Yaohua628 . This seems to break the Python Linter CI.
```
./examples/src/main/python/sql/datasource.py:35:17: E128 continuation line
under-indented for visual indent
[21](https://github.com/Yaohua628/spark/runs/5967096763?check_suite_focus=true#step:15:21)
"examples/src/main/resources/dir1/dir2/")
[22](https://github.com/Yaohua628/spark/runs/5967096763?check_suite_focus=true#step:15:22)
^
[23](https://github.com/Yaohua628/spark/runs/5967096763?check_suite_focus=true#step:15:23)
./examples/src/main/python/sql/datasource.py:48:42: E128 continuation line
under-indented for visual indent
[24](https://github.com/Yaohua628/spark/runs/5967096763?check_suite_focus=true#step:15:24)
"examples/src/main/resources/dir1/dir2/")
```
--
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]