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  .
@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]