Skip to content

feat(sql): align glob() function with DuckDB glob syntax#6552

Merged
bluestreak01 merged 11 commits intomasterfrom
glob_function
Dec 22, 2025
Merged

feat(sql): align glob() function with DuckDB glob syntax#6552
bluestreak01 merged 11 commits intomasterfrom
glob_function

Conversation

@kafka1991
Copy link
Copy Markdown
Collaborator

@kafka1991 kafka1991 commented Dec 18, 2025

Part of #6369

Refactors glob() function to use native glob matching instead of Java regex, aligning with DuckDB's glob syntax:

Wildcard Description
* Matches any number of characters (including none)
** Matches any number of subdirectories (including none)
? Matches any single character
[abc] Matches one character in the bracket
[a-z] Matches one character from the range

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 18, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch glob_function

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kafka1991 kafka1991 changed the title feat(sql): refactor glob function feat(sql): align glob() function with DuckDB glob syntax Dec 18, 2025
kafka1991 and others added 3 commits December 22, 2025 11:47
…ll safety

- Add explicit symlink skip in globFilesInternal for consistency with
  recursive methods
- Fix DirectUtf8StringList.put(DirectUtf8Sequence) to return early for
  null instead of adding empty element (consistent with put(Utf8Sequence))
- Add javadoc for both put() methods documenting null behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bluestreak01
Copy link
Copy Markdown
Member

build timed out publishing code coverage to http somewhere

@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 461 / 521 (88.48%)

file detail

path covered line new line coverage
🔵 io/questdb/std/str/DirectUtf8StringList.java 49 57 85.96%
🔵 io/questdb/griffin/engine/functions/catalogue/GlobFilesFunctionFactory.java 380 431 88.17%
🔵 io/questdb/griffin/engine/functions/regex/GlobStrFunctionFactory.java 17 18 94.44%
🔵 io/questdb/std/Misc.java 14 14 100.00%
🔵 io/questdb/std/str/DirectUtf8Sink.java 1 1 100.00%

@bluestreak01 bluestreak01 merged commit d71ac2d into master Dec 22, 2025
43 checks passed
@bluestreak01 bluestreak01 deleted the glob_function branch December 22, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants