lowka commented on code in PR #2683:
URL: https://github.com/apache/ignite-3/pull/2683#discussion_r1358322878


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -559,11 +559,24 @@ public MetricManager metricManager() {
     private static void validateParsedStatement(
             QueryContext context,
             ParsedResult parsedResult,
+            @Nullable InternalTransaction outerTx,
             Object[] params
     ) {
         Set<SqlQueryType> allowedTypes = context.allowedQueryTypes();
         SqlQueryType queryType = parsedResult.queryType();
 
+        if (parsedResult.queryType() == SqlQueryType.TX_CONTROL) {
+            if (outerTx != null) {

Review Comment:
   > I'm not sure what the Script Processor will look like and I think this 
part will change somehow in any case.
   It will.  But I think it better to have a messages like that give a 
descriptive error message. Instead of generic `Expected ... but got ...` which 
should be clearly improved.



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -559,11 +559,24 @@ public MetricManager metricManager() {
     private static void validateParsedStatement(
             QueryContext context,
             ParsedResult parsedResult,
+            @Nullable InternalTransaction outerTx,
             Object[] params
     ) {
         Set<SqlQueryType> allowedTypes = context.allowedQueryTypes();
         SqlQueryType queryType = parsedResult.queryType();
 
+        if (parsedResult.queryType() == SqlQueryType.TX_CONTROL) {
+            if (outerTx != null) {

Review Comment:
   > I'm not sure what the Script Processor will look like and I think this 
part will change somehow in any case.
   
   It will.  But I think it better to have a messages like that give a 
descriptive error message. Instead of generic 
   `Expected ... but got ...` which should be clearly improved.



-- 
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