Yash-cor commented on issue #31368:
URL: 
https://github.com/apache/shardingsphere/issues/31368#issuecomment-2437279448

   @strongduanmu Could you please read it and give me some advice.
   
   > If we are giving input to our ANTLR for parse tree generation
   > 
   > ` SELECT JSON_SCHEMA_VALIDATION_REPORT( '{ "$schema": 
"https://json-schema.org/draft/2020-12/schema";, "type": "object", "properties": 
{ "name": {"type": "string"}, "age": {"type": "integer"}, "email": {"type": 
"string"} }, "required": ["name", "age"] }', '{ "name": "Alice", "age": 25, 
"email": "[email protected]" }' );`
   > 
   > Then this is working fine and giving us correct parse tree
   > 
   > Also I noted that if we are writing sql query in this format `SELECT 
JSON_SCHEMA_VALIDATION_REPORT( @schema, @document );`
   > 
   > its not giving the parse tree
   > 
   > But if we write like `SELECT JSON_SCHEMA_VALIDATION_REPORT( 
@some_other_name_in_palce_of_schema, @document );`
   > 
   > It gives correct parse tree
   > 
   > I think the error in this way `SELECT 
JSON_SCHEMA_VALIDATION_REPORT(@schema, @document);` is that parser does not 
accepts JSON file in this format it causes error. So do i have to change 
grammar so that it accepts this format or is it fine this way ![ANTLR parse 
tree](https://private-user-images.githubusercontent.com/179561629/378703387-79617ada-13eb-463e-8bda-72588330c7f3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mjk4NDczMTYsIm5iZiI6MTcyOTg0NzAxNiwicGF0aCI6Ii8xNzk1NjE2MjkvMzc4NzAzMzg3LTc5NjE3YWRhLTEzZWItNDYzZS04YmRhLTcyNTg4MzMwYzdmMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQxMDI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MTAyNVQwOTAzMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNTZjMjg1MTNlZjY3ZjliODNkNTZlZDdmY2FkYmQ0YzhmYWQ4MzEzODlhNjRjODczZDVmNjIwOWQxNzhmNWRlJlgtQW16LVNpZ25lZEhlYWRl
 cnM9aG9zdCJ9.crpsqrToLI7fMYHPQrYAzIRiQTusrxsIFMOIaVo5uGI) .
   
   @strongduanmu Could you please read it and give me some advice.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to