Skip to content
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

Support parsing SQL Server SELECT JSON_OBJECT('name':'value', sql #29160 #29740

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

yydeng626
Copy link
Collaborator

@yydeng626 yydeng626 commented Jan 16, 2024

Fixes #29160.

Changes proposed in this pull request:

  • add json_object feature [offical link](offical link)
  • add json_array feature [offical link](offical link)
  • support sql :
SELECT JSON_OBJECT('name':'value', 'type':1)
SELECT JSON_OBJECT('name':'value', 'type':NULL ABSENT ON NULL)
SELECT JSON_OBJECT('name':'value', 'type':JSON_ARRAY(1, 2))
SELECT JSON_OBJECT('name':'value', 'type':JSON_OBJECT('type_id':1, 'name':'a'))
SELECT JSON_OBJECT('user_name':USER_NAME(), @id_key:@id_value, 'sid':(SELECT @@SPID))

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

# Conflicts:
#	parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4
#	parser/sql/dialect/sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/SQLServerStatementVisitor.java
#	test/it/parser/src/main/resources/case/dml/select-special-function.xml
#	test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
@yydeng626
Copy link
Collaborator Author

Please assist me in reviewing the code,there are certain issues dependent on this particular one.

@strongduanmu strongduanmu merged commit 07cc083 into apache:master Jan 19, 2024
139 checks passed
Sign up for free to 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.

Support parsing SQL Server SELECT JSON_OBJECT('name':'value', sql
2 participants