You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2023/01/12 20:49:19 UTC

[GitHub] [cassandra] maedhroz commented on a diff in pull request #2088: CASSANDRA-18154: CEP-15: Enhance returning SELECT to allow partition and clustering IN clauses to return multiple partitions/rows

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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org