zihaoAK47 commented on code in PR #29329:
URL: https://github.com/apache/shardingsphere/pull/29329#discussion_r1421345913
##########
parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4:
##########
@@ -151,7 +152,7 @@ sequenceName
;
tableName
- : (owner DOT_)? name
+ : ((databaseName DOT_)? owner DOT_)? name
Review Comment:
Hi according to the definition of SQL Server insert syntax, databaseName is
a selection pattern.
##########
parser/sql/dialect/sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4:
##########
@@ -167,7 +168,11 @@ serviceName
;
columnName
- : (owner DOT_)? name
+ : (owner DOT_)? (name | scriptVariableName)
+ ;
+
+scriptVariableName
+ : DOLLAR_ LP_ name RP_
Review Comment:
Can we put this grammar rule definition in columnName?
##########
parser/sql/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/value/literal/impl/StringLiteralValue.java:
##########
@@ -30,7 +30,11 @@ public final class StringLiteralValue implements
LiteralValue<String> {
private final String value;
public StringLiteralValue(final String value) {
- this.value = value.substring(1, value.length() - 1);
+ if (value.startsWith("N")) {
Review Comment:
Can we solve this problem by adjusting Oracle's lexical or grammatical rules
and related parsing code?
--
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]