【发布时间】:2019-09-16 05:13:17
【问题描述】:
我在 CQL 中创建了下表:
CREATE TABLE new_table (
idRestaurant INT,
restaurant map<text,varchar>,
InspectionDate date,
ViolationCode VARCHAR,
ViolationDescription VARCHAR,
CriticalFlag VARCHAR, Score INT, GRADE VARCHAR,
PRIMARY KEY (InspectionDate )) ;
然后,我通过jar插入数据,我得到restaurant column的值就像json/dictionary
select restarutant from new_table; 类似于以下结果:
在普通 SQL 中选择 json 列的键值应该是 select json_col.key from table 但这不适用于 CQL,我如何选择 JSON 的键值作为列或 WHERE 条件过滤?
非常感谢
【问题讨论】: