0

我尝试使用服务控制台使用 ORDER BY 运行一些查询。得到以下错误:

 QUERY: Illegal Argument: The driver or SDK being used does not support queries with order by expressions that do not include a "where" clause specifying a complete shard key

在测试这个简单的查询时:

 SELECT ID FROM test1 ORDER BY ID;

然后我添加了 WHERE 子句:

 SELECT ID FROM test1 WHERE ID < 3 ORDER BY ID;

仍然得到同样的错误:

 QUERY: Illegal Argument: The driver or SDK being used does not support queries with order by expressions that do not include a "where" clause specifying a complete shard key

我哪里做错了?控制台可能不支持?错误消息具有误导性。

我的表只有 2 列:用户 ID 和帐户余额

我在本地产品中进行了测试。他们显然工作。以下是简单的测试:

 sql-> SELECT ID FROM test1 ORDER BY ID;
 {"ID":1}
 {"ID":2}
 {"ID":3}

 sql-> SELECT ID FROM test1 WHERE ID < 3 ORDER BY ID;
 {"ID":1}
 {"ID":2}

您能否验证云服务中是否支持 ORDER BY?

4

0 回答 0