-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Added BITXOR to Doris parsing support (#31508) #33258
Conversation
Includes test case and change to `getAllDatabaseTypes`
Note currently BITXOR sits under `identifierKeywordsUnambiguous` and not `customKeyword`.
LGTM. |
Hi @danigiri, can you update the release note for 5.5.2-SNAPSHOT? |
https://shardingsphere.apache.org/community/en/involved/conduct/code/#maintenance-conduct |
Thanks for the review and comments, will do next:
Also
|
looks like MySQL implements the same operation with
which is already present in
From what I understand, this means no further action is needed? I will look at the |
It looks like MySQL only supports BIT_XOR() and is slightly different from Doris. Maybe you can add a mark with the differential codes. |
Not exactly, they are in fact relatively different, here's a breakdown of the situation: MySQL BIT_XOR()This is an aggregation function https://dev.mysql.com/doc/refman/8.4/en/aggregate-functions.html
^ in MySQLThis is a bitwise expression https://dev.mysql.com/doc/refman/8.4/en/bit-functions.html
Doris BITXOR()This is a bitwise function https://doris.apache.org/docs/sql-manual/sql-functions/bitwise-functions/bitxor/ which is equivalent to the MySQL
Doris GROUP_BIT_XORThis is an aggregation function https://doris.apache.org/docs/1.2/sql-manual/sql-functions/aggregate-functions/group_bit_xor/ equivalent to the MySQL
In summary:
Given this, does it change the approach? I am not sure what you mean by
if you have a commit / PR I could use as an example that would be super. Do you mean a comment in .g4 or something else? |
cc @iamhucong (see my reply above, thx) |
Great, thanks for checking that out! https://shardingsphere.apache.org/community/en/involved/conduct/code/#maintenance-conduct
I mean this comment mark. Try searching for |
Cool, thx. I am going to give it a go in my upcoming PR, thanks for the clrifications. |
* Added support for INSTR to Doris parsing - related to #31508 - includes test - `mvn spotless:apply -Pcheck` and `mvn test -Dtest=InternalDorisParserIT` - will update release notes in next commit - will check if MySQL supports INSTR in next commit - verified query in Doris * Updated release notes to reflect #33258 * Added comment markers for INSTR and BIT_XOR Small additional changes: - Also moved the java code to match the order in g4 more. - Added missing import as well. * Added release notes Also added missing `// DORIS ADDED BEGIN|END` marker
Compiling the just released doris 3.0 and will look at the next keywords |
As part of hacktoberfest, this is a POC for adding more parsing logic to Doris support. If this is successful, I will look at the other Doris SQL keywords in subsequent PRs. Starts to address #31508.
I understand that I cannot add the labels to the PR and maintainers have to do it.
Changes proposed in this pull request:
getAllDatabaseTypes
is really needed, can roll it backBITXOR
sits inidentifierKeywordsUnambiguous
and notcustomKeyword
at the momentNext:
Just realised I modified the(fixed in an additional commit in the PR)BIT_XOR
aggregation keyword instead of creating a new one. I can fix this quickly in a new commit in this PRComments:
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.mvn spotless:apply -Pcheck
mvn test -Dtest=InternalDorisParserIT
inshardingsphere/parser/sql/dialect/doris
SELECT BITXOR(3,5)