You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 21:40:46 UTC

[GitHub] [beam] damccorm opened a new issue, #21140: Globbing asterisk cannot be escaped in file reads.

damccorm opened a new issue, #21140:
URL: https://github.com/apache/beam/issues/21140

   `TextIO.read().from("*.txt")` always expands, and escaping the asterisk does not help if there is a file that starts with a literal asterisk.
   
   Imported from Jira [BEAM-13231](https://issues.apache.org/jira/browse/BEAM-13231). Original Jira may contain additional context.
   Reported by: robertwb.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on issue #21140: Globbing asterisk cannot be escaped in file reads.

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1513677502

   I'm not actually sure off the top of my head - @johnjcasey do you know where we define our filepattern logic?
   
   Also, this issue is labeled Python, but I think its just a Java issue


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] raymonddinh commented on issue #21140: Globbing asterisk cannot be escaped in file reads.

Posted by GitBox <gi...@apache.org>.
raymonddinh commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1373088045

   .take-issue


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Globbing asterisk cannot be escaped in file reads. [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1814821480

   .take-issue


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] smeet07 commented on issue #21140: Globbing asterisk cannot be escaped in file reads.

Posted by "smeet07 (via GitHub)" <gi...@apache.org>.
smeet07 commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1502191795

   @damccorm I think we can use use glob module in python to avoid expansion of the wildcard * 


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] smeet07 commented on issue #21140: Globbing asterisk cannot be escaped in file reads.

Posted by "smeet07 (via GitHub)" <gi...@apache.org>.
smeet07 commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1502361660

   R: @damccorm
   I think we can use use glob module in python to avoid expansion of the wildcard *


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] smeet07 commented on issue #21140: Globbing asterisk cannot be escaped in file reads.

Posted by "smeet07 (via GitHub)" <gi...@apache.org>.
smeet07 commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1513496548

   @damccorm could you list the file that needs to be edited, couldn't find it by searching 


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Globbing asterisk cannot be escaped in file reads. [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on issue #21140:
URL: https://github.com/apache/beam/issues/21140#issuecomment-1817092946

   I am not able to reproduce the original issue reported here, but I do find something interesting about the logic we implemented in Java.
   
   Basically, given a pattern (with wildcards or not), we will **first** check if there is a file name that matches exactly on the pattern (without any expansion). In other words, if there is a file named`*.txt` in the folder to match and we are trying to match a pattern `*.txt`, then only this file will be returned. 
   
   If there is no such an exact match, we then consider it as a glob pattern and match it using the glob syntax with 
    an api in `java.nio.FileSystem`.
   
   Notice that, in the second mode, "*" and "?" can be escaped by surrounding it with a pair of square brackets.
   
   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org