Add patches from tea/vendor - #1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR incorporates a set of downstream patch changes (previously carried in tea/vendor) directly into this branch to make the Arrow patchset more transparent and easier to migrate across Arrow versions.
Changes:
- Update the c-ares thirdparty download URL to use the GitHub release asset location.
- Adjust Gandiva LIKE/ILIKE handling to use RE2 dotall mode (and register a holder maker for
ilike), with corresponding test updates. - Add a Snappy decompression fast-path for zero-length input.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cpp/thirdparty/versions.txt | Switches c-ares source URL to GitHub releases. |
| cpp/src/gandiva/regex_functions_holder.h | Extends LIKE holder factory API to accept RE2 options for escape-char form. |
| cpp/src/gandiva/regex_functions_holder.cc | Enables dotall in LIKE/ILIKE holder creation; wires ilike behavior through options. |
| cpp/src/gandiva/regex_functions_holder_test.cc | Adds newline-related LIKE coverage and updates calls to pass RE2 options. |
| cpp/src/gandiva/function_holder_maker_registry.cc | Registers a function holder maker for ilike. |
| cpp/src/arrow/util/compression_snappy.cc | Adds early return for input_len == 0 in Snappy decompression. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
40
to
47
| static Result<std::shared_ptr<LikeHolder>> Make(const std::string& sql_pattern); | ||
|
|
||
| static Result<std::shared_ptr<LikeHolder>> Make(const std::string& sql_pattern, | ||
| const std::string& escape_char); | ||
| const std::string& escape_char, | ||
| RE2::Options regex_op); | ||
|
|
||
| static Result<std::shared_ptr<LikeHolder>> Make(const std::string& sql_pattern, | ||
| RE2::Options regex_op); |
Comment on lines
101
to
105
| RE2::Options regex_op; | ||
| regex_op.set_dot_nl(true); // set dotall mode for the regex. | ||
| if (node.descriptor()->name() == "ilike") { | ||
| regex_op.set_case_sensitive(false); // set case-insensitive for ilike function. | ||
|
|
Comment on lines
119
to
123
| Status::Invalid( | ||
| "'like' function requires a string literal as the third parameter")); | ||
| return Make(std::get<std::string>(literal->holder()), | ||
| std::get<std::string>(escape_char->holder())); | ||
| std::get<std::string>(escape_char->holder()), regex_op); | ||
| } |
Comment on lines
44
to
+48
| Result<int64_t> Decompress(int64_t input_len, const uint8_t* input, | ||
| int64_t output_buffer_len, uint8_t* output_buffer) override { | ||
| if (input_len == 0) { | ||
| return 0; | ||
| } |
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.
I moved patches from https://github.com/lithium-tech/tea/tree/main/vendor/arrow to this this branch in order to to improve transparency and make it easier to migrate to other versions of arrow