mirror of https://github.com/apache/cassandra
Better error message when order by is used with 2ndary indexes
This commit is contained in:
parent
d0292ef45a
commit
cb7a231a2f
|
|
@ -1115,6 +1115,9 @@ public class SelectStatement implements CQLStatement
|
|||
|
||||
if (!stmt.parameters.orderings.isEmpty())
|
||||
{
|
||||
if (!stmt.metadataRestrictions.isEmpty())
|
||||
throw new InvalidRequestException("ORDER BY with 2ndary indexes is not supported.");
|
||||
|
||||
if (stmt.isKeyRange())
|
||||
throw new InvalidRequestException("ORDER BY is only supported when the partition key is restricted by an EQ or an IN.");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue