Coder Social home page Coder Social logo

Comments (5)

ritchie46 avatar ritchie46 commented on May 29, 2024 1

I just see this now. I will ensure we will have a glob flag upstream in Polars which users can toggle off.

from dagster.

CrispyCrafter avatar CrispyCrafter commented on May 29, 2024

It seems that polars is interpreting square brackets [ ] as valid shell-glob syntax.
I would recommend that this pattern is not used for DynamicOutput persistent object paths as it is inevitable that a third party package that uses glob would fail.

This is from the glob man page:

       Character classes

       An expression "[...]" where the first character after the leading
       '[' is not an '!' matches a single character, namely any of the
       characters enclosed by the brackets.  The string enclosed by the
       brackets cannot be empty; therefore ']' can be allowed between
       the brackets, provided that it is the first character.  (Thus,
       "[][!]" matches the three characters '[', ']', and '!'.)

       Ranges

       There is one special convention: two characters separated by '-'
       denote a range.  (Thus, "[A-Fa-f0-9]" is equivalent to
       "[ABCDEFabcdef0123456789]".)  One may include '-' in its literal
       meaning by making it the first or last character between the
       brackets.  (Thus, "[]-]" matches just the two characters ']' and
       '-', and "[--0]" matches the three characters '-', '.', and '0',
       since '/' cannot be matched.)

https://man7.org/linux/man-pages/man7/glob.7.html

Here is the core bug being tracked in polars

pola-rs/polars#12876

from dagster.

CrispyCrafter avatar CrispyCrafter commented on May 29, 2024

I just see this now. I will ensure we will have a glob flag upstream in Polars which users can toggle off.
@ritchie46

Although I agree that a glob flag would be useful in polars, it seems that in the case of Dagster, the convention of using square brackets is really the key issue here.

For instance, say an operation created as set out partitioned outputs with the pattern:
output/[partition_A]/[partition_B]/*.parquet one would like the ability to read all files in lowest folder root.

Perhaps it should be considered invalid syntax to write files containing square brackets and reserve [] to act as correct glob functionality for reads

from dagster.

CrispyCrafter avatar CrispyCrafter commented on May 29, 2024

Compiled and tested against polars master branch. Can confirm the issue has been fixed.
It should be resolved with the latest polars release

from dagster.

CrispyCrafter avatar CrispyCrafter commented on May 29, 2024

Scrap that latest got released two hours ago.

from dagster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.