maedhroz commented on code in PR #2088:
URL: https://github.com/apache/cassandra/pull/2088#discussion_r1068640086


##########
src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:
##########
@@ -177,9 +178,16 @@ TxnNamedRead createNamedRead(NamedSelect namedSelect, 
QueryOptions options)
         SinglePartitionReadQuery.Group<SinglePartitionReadCommand> selectQuery 
= (SinglePartitionReadQuery.Group<SinglePartitionReadCommand>) readQuery;
 
         if (selectQuery.queries.size() != 1)
-            throw new IllegalArgumentException("Within a transaction, SELECT 
statements must select a single partition; found " + selectQuery.queries.size() 
+ " partitions");
+        {
+            if (!TxnDataName.returning().equals(namedSelect.name))
+                throw new IllegalArgumentException("Within a transaction, 
SELECT statements must select a single partition; found " + 
selectQuery.queries.size() + " partitions");

Review Comment:
   ```suggestion
                   throw new IllegalArgumentException("Within a transaction, 
implicit reads and reads within LET statements must select a single partition; 
found " + selectQuery.queries.size() + " partitions");
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to