Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1446.
glob(path)is now a table function. It answers onefile VARCHARrow for each file a pattern matches and reads none of them, which the corpus uses in 80 records and which rudb refused before as a table function that does not exist.It takes a pattern or a list of them. The matches of one pattern come out sorted, and a list keeps the order it was written in, duplicates and all, so
glob(['b.csv', '*.csv'])givesb.csv,a.csv,b.csv, as the pin does.**matches at any depth, hidden files are listed, and a directory is not a file, so a pattern that names only directories gives no rows. A path that matches nothing, an empty string and an empty list give no rows rather than an error.The refusals are the pin's: a NULL argument, a NULL in a list, a list of something other than strings, a number, and a named parameter, each in the pin's words.
duckdb_functions()lists the three overloads the pin lists, for VARCHAR, ANY[] and VARIANT.The paths are worked out in the binder the way
read_textandread_blobwork them out, so the executor is handed names rather than a pattern. A test in crates/rudb/tests/read_text.rs covers the patterns, the list order, the empty cases, the overloads and the refusals, checked on v2.0.0-dev84237.