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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sql failed when using replace function #9524
base: master
Are you sure you want to change the base?
Fix sql failed when using replace function #9524
Changes from 1 commit
6b1ef3b
42be4d8
f163a32
92e8833
fd4d75e
ec18d50
3284676
b09195b
ec6c7d0
6408ebd
b80338a
2e83159
5fc3f5e
464d990
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly no need for a lot of impls because we are fixing for an edge case that only discovered in tests. It is acceptable to be not performance optimal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my test case, some sql like :
will get same error. I think it may need to process, so I add these function to deal with such problems. 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I mean we could use a slower but more general impl for such cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we modify existing functions instead of introducing new ones? Existing functions are already capable of handling a list of sources. It should be better to allow it handling constant source (i.e. one source), minimizing the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these functions are necessary because the first parameter of existing functions is
Column
by default, which will be parsed intoColumnString
inFunctionsStringSearch.cpp
, and our implementation needs to parse the parameter intoColumnConst
.ColumnConst
does not havegetChars
andgetOffsets
methods, so existing functions cannot be used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make sense. Think about it. A function can now calculate a bunch of FN(A, B), why cannot calculate a single row of FN(ConstA, ConstB)? What we want to support is a subset of the current capability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I found a way to convert between the two types, so that now the existing function can be used directly, and the amount of code is greatly reduced.