ygerzhedovich commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1086571364


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -401,19 +402,22 @@ private CompletableFuture<AsyncSqlCursor<List<Object>>> 
querySingle0(
                 .thenCompose(sqlNode -> {
                     final boolean rwOp = dataModificationOp(sqlNode);
                     final HybridTimestamp txTime = outerTx != null ? 
outerTx.readTimestamp() : rwOp ? null : clock.now();
+                    boolean distributedSqlDisabled = txTime == null;
+                    UUID txId = outerTx == null || distributedSqlDisabled ? 
null : outerTx.id();
 
                     BaseQueryContext ctx = BaseQueryContext.builder()
                             .frameworkConfig(
                                     
Frameworks.newConfigBuilder(FRAMEWORK_CONFIG)
                                             .defaultSchema(schema)
-                                            .traitDefs(rwOp || (outerTx != 
null && !outerTx.isReadOnly()) ? Commons.LOCAL_TRAITS_SET :
-                                                    
Commons.DISTRIBUTED_TRAITS_SET)
+                                            .traitDefs(distributedSqlDisabled 
? Commons.LOCAL_TRAITS_SET : Commons.DISTRIBUTED_TRAITS_SET)
+                                            
.traitDefs(Commons.DISTRIBUTED_TRAITS_SET)

Review Comment:
   why do you have the row?  It looks as repeat )



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