CalvQ commented on code in PR #56374:
URL: https://github.com/apache/spark/pull/56374#discussion_r3438860093


##########
examples/src/main/python/sql/datasource.py:
##########
@@ -67,6 +67,14 @@ def generic_file_source_options_example(spark: SparkSession) 
-> None:
     # |file2.parquet|
     # +-------------+
     # $example off:recursive_file_lookup$
+
+    # $example on:ignored_path_segment_regex$
+    # "(?!)" surfaces files that are hidden by default (e.g. names starting 
with "_" or ".")
+    surfaced_df = spark.read.format("parquet")\
+        .option("ignoredPathSegmentRegex", "(?!)")\

Review Comment:
   Empty string using the .find pattern actually matches *all* strings, which 
would mean we filter everything. 
   
   I agree that the `""` pattern intuitively means allow everything, so I've 
added a specific edge-case for this, and swapped all examples to this 



-- 
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]

Reply via email to