Uh oh!
There was an error while loading. Please reload this page.
ARROW-10306: [C++] Add string replacement kernel - #8468
Conversation
pitrou
commented
Oct 19, 2020
You may want to remove the regex variant of this if you want to move this forward without depending on resolving the re2 dependency issue. |
jorisvandenbossche
commented
Nov 24, 2020
@maartenbreddels would it be practical to split this into two PRs? (one for plain replace, other for re2-based replace) Or would you prefer first to have the re2 dependency issue resolved? (ARROW-10541) |
c55f9ec to
1099f4eCompare6f41599 to
e1c0571Comparemaartenbreddels
commented
Nov 25, 2020
I'd rather keep this 1 PR, looks like #8756 is working |
maartenbreddels
commented
Nov 25, 2020
@pitrou this is ready for review, failure seems unrelated (minio on windows). |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
ReplaceString below is basically independent from Type, but using this idiom may compile it twice. Can you find another way to parametrize the kernel?
(hint: perhaps use composition rather than inheritance)
There was a problem hiding this comment.
Maybe I misunderstand, but via offset_type we are not independent of Type right?
There was a problem hiding this comment.
Well, I don't understand why offset_type is being used here. ValueDataBuilder is basically a TypedBufferBuilder<uint8_t>, it's used for building the string data, it doesn't deal with string offsets.
There was a problem hiding this comment.
Ok, yes, I see it now. I'm using offset_type in this class as well, which I shouldn't, I think that's what led me to this. This requires a bit of refactoring.
There was a problem hiding this comment.
This pattern occurs more often in the file, I didn't realize this lead to slower compilation and probably larger binary sizes. I think it requires a refactor that is larger than this PR. Also, I won't have the time currently to do this. Can we merge this as is, and I'll open a Jira issue?
There was a problem hiding this comment.
Well, you don't need to refactor other kernels for now, but I suppose this one could easily be adapted, no? :-)
There was a problem hiding this comment.
Similarly as above, this looks basically independent from Type.
There was a problem hiding this comment.
Note that the GlobalReplace loop works a bit differently, it calls Match then Rewrite, avoiding the duplicate matching calls. Not sure it's worth optimizing this, though:
https://github.com/google/re2/blob/master/re2/re2.cc#L427
There was a problem hiding this comment.
Good idea, I prefer to keep it as it is, I left a comment in the code so this doesn't get lost.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
e1c0571 to
60d6589Compare3f8aa29 to
bd5e8feComparepitrou
commented
Jan 19, 2021
@maartenbreddels Is it ready for review again? Feel free to ping me. |
maartenbreddels
commented
Jan 19, 2021
@pitrou Yes, apart from an unanswered question this is ready for review 👍 |
bd5e8fe to
436a9e2Comparemaartenbreddels
commented
Mar 12, 2021
@pitrou this is ready for review (assuming you agree with the above plan of doing a refactor later on) |
jorisvandenbossche
commented
Mar 25, 2021
(gentle ping here, would really like to see those PRs merged for 4.0 in April!) |
pitrou
commented
Mar 25, 2021
I'll rebase and update this PR. |
pitrou
commented
Mar 25, 2021
Hmm, there's a re2 link error on RTools 3.5: |
nealrichardson
commented
Mar 25, 2021
Haven't seen that before, and we've been building with re2 for months now. Maybe this is the first time we're building something that actually uses re2? It's possible that re2 needs a "backport" library built with the rtools3.5 toolchain; an immediate workaround could be to build with |
nealrichardson
commented
Mar 25, 2021
@github-actions crossbow submit -g r |
Revision: 82bb60d Submitted crossbow builds: ursacomputing/crossbow @ actions-233 |
nealrichardson
commented
Mar 26, 2021
The as-cran failure is legit: https://github.com/ursacomputing/crossbow/runs/2197449739?check_suite_focus=true#step:7:210 It's a weird build setup that uses |
nealrichardson
commented
Mar 26, 2021
I made ARROW-12094 for fixing that build. Merging now. |
Two new kernels