Skip to content

ARROW-12410: [C++][Gandiva] Implement regexp_replace function on Gandiva - #10059

Closed
rodrigojdebem wants to merge 1 commit into
apache:masterfrom
s1mbi0se:feature/implement-regexp-replace
Closed

ARROW-12410: [C++][Gandiva] Implement regexp_replace function on Gandiva#10059
rodrigojdebem wants to merge 1 commit into
apache:masterfrom
s1mbi0se:feature/implement-regexp-replace

Conversation

@rodrigojdebem

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW

Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@rodrigojdebemrodrigojdebem changed the title [ARROW-12410][C++][Gandiva] Implement regexp_replace function on GandivaARROW-12410: [C++][Gandiva] Implement regexp_replace function on GandivaApr 15, 2021
@github-actions

Copy link
Copy Markdown

Comment threadcpp/src/gandiva/precompiled/string_ops.cc Outdated
Comment threadcpp/src/gandiva/replace_holder.cc Outdated
Comment threadcpp/src/gandiva/precompiled/string_ops.cc Outdated
Comment threadcpp/src/gandiva/gdv_function_stubs.cc Outdated
Comment threadcpp/src/gandiva/gdv_function_stubs.cc Outdated
Comment threadcpp/src/gandiva/precompiled/types.h Outdated
Comment threadcpp/src/gandiva/gdv_function_stubs.cc Outdated
Comment threadcpp/src/gandiva/replace_holder_test.cc Outdated
Comment threadcpp/src/gandiva/gdv_function_stubs.cc Outdated
Comment threadcpp/src/gandiva/gdv_function_stubs.cc Outdated
Comment threadcpp/src/gandiva/gdv_function_stubs.cc Outdated
Comment threadcpp/src/gandiva/replace_holder.h Outdated
Comment threadcpp/src/gandiva/replace_holder.h Outdated
Comment threadcpp/src/gandiva/replace_holder.h Outdated
Comment threadcpp/src/gandiva/replace_holder.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't return user_input.data() since it wil get deallocated when returning from the parent function. Its better just pass the user_input char* and len as parameters to the method, instead of passing std::string and memcpying for no replace

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem solved, now, for this case is returning the user input char pointer

Comment threadcpp/src/gandiva/replace_holder.h Outdated
Comment threadcpp/src/gandiva/replace_holder.h Outdated
@anthonylouisbsb
anthonylouisbsbforce-pushed the feature/implement-regexp-replace branch 2 times, most recently from cca8c38 to 0aee337CompareMay 7, 2021 12:21
Comment threadcpp/src/gandiva/replace_holder.cc Outdated
Comment threadcpp/src/gandiva/replace_holder.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullptr

@rodrigojdebemrodrigojdebemMay 12, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@projjal the cpp linter runs a checker that raises an error if there is some nullptr construction inside a header file. I need to use the NULLPTR macro to works.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment threadcpp/src/gandiva/replace_holder.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the third argument be replace_input_as_str

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@projjal yeah, it should so I did changed the argument to replace_input_as_str

@augustoasilva
augustoasilvaforce-pushed the feature/implement-regexp-replace branch from 4420eee to cf7a800CompareMay 20, 2021 14:17
@praveenbingo

Copy link
Copy Markdown
Contributor

@projjal needs a rebase

@anthonylouisbsb
anthonylouisbsbforce-pushed the feature/implement-regexp-replace branch from cf7a800 to c397031CompareJune 7, 2021 12:41
@anthonylouisbsb

Copy link
Copy Markdown
Contributor

@praveenbingo The rebase was applied in the Pull Request.

@anthonylouisbsb
anthonylouisbsbforce-pushed the feature/implement-regexp-replace branch from c397031 to 7da85c1CompareJune 29, 2021 16:41
@anthonylouisbsb
anthonylouisbsbforce-pushed the feature/implement-regexp-replace branch from 7da85c1 to baf2778CompareJuly 13, 2021 13:12
@anthonylouisbsb

Copy link
Copy Markdown
Contributor

@projjal@praveenbingo I applied the rebase

jvictorhuguenin pushed a commit to s1mbi0se/arrow that referenced this pull request Sep 21, 2021
Closesapache#10059 from rodrigojdebem/feature/implement-regexp-replace and squashes the following commits:
baf2778 <rodrigojdebem> Add implementation for REGEXP_REPLACE
Authored-by: rodrigojdebem <rodrigodebem1@gmail.com>
Signed-off-by: Praveen <praveen@dremio.com>
(cherry picked from commit 5f0641b)
@anthonylouisbsb
anthonylouisbsb deleted the feature/implement-regexp-replace branch September 28, 2021 22:31
zhouyuan pushed a commit to zhouyuan/arrow that referenced this pull request Nov 24, 2021
Closesapache#10059 from rodrigojdebem/feature/implement-regexp-replace and squashes the following commits:
baf2778 <rodrigojdebem> Add implementation for REGEXP_REPLACE
Authored-by: rodrigojdebem <rodrigodebem1@gmail.com>
Signed-off-by: Praveen <praveen@dremio.com>
zhouyuan added a commit to oap-project/arrow that referenced this pull request Nov 25, 2021
* ARROW-11960: [C++][Gandiva] Support escape in LIKE
Add gdv_fn_like_utf8_utf8_int8 function in Gandiva to support escape char in LIKE. An escape char is stored in an int8 type which is compatible with char type in C++.
Closesapache#9700 from Crystrix/arrow-11960
Authored-by: crystrix <chenxi.li@live.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
* ARROW-12567: [C++][Gandiva] Implement ILIKE SQL function
Closesapache#10179 from jvictorhuguenin/feature/implement-sql-ilike and squashes the following commits:
f160880 <frank400> Optimize holder constructor call
97e6e2d <frank400> Remove unnecessary Make method
c2363b1 <frank400> Disable TryOptimize for ilike
a484149 <frank400> Fix checkstyle on cmake file
c6a8372 <frank400> Delete unnecessary holder
4be6cc6 <frank400> Fix redefined function
b78085a <frank400> Fix miss include
2efd43e <frank400> Implement ilike function
Authored-by: frank400 <j.victorhuguenin2018@gmail.com>
Signed-off-by: Praveen <praveen@dremio.com>
* ARROW-12410: [C++][Gandiva] Implement regexp_replace function on Gandiva
Closesapache#10059 from rodrigojdebem/feature/implement-regexp-replace and squashes the following commits:
baf2778 <rodrigojdebem> Add implementation for REGEXP_REPLACE
Authored-by: rodrigojdebem <rodrigodebem1@gmail.com>
Signed-off-by: Praveen <praveen@dremio.com>
Co-authored-by: crystrix <chenxi.li@live.com>
Co-authored-by: frank400 <j.victorhuguenin2018@gmail.com>
Co-authored-by: rodrigojdebem <rodrigodebem1@gmail.com>
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
Closesapache#10059 from rodrigojdebem/feature/implement-regexp-replace and squashes the following commits:
baf2778 <rodrigojdebem> Add implementation for REGEXP_REPLACE
Authored-by: rodrigojdebem <rodrigodebem1@gmail.com>
Signed-off-by: Praveen <praveen@dremio.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@rodrigojdebem@praveenbingo@anthonylouisbsb@augustoasilva@projjal