问题描述
任何提示,为什么我会从该主题中得到错误。在下面,我粘贴了所有步骤来重现该错误。
Any clue why I am getting the error from the topic. Bellow I pasted all steps to reproduce the error.
我发现有人面临着相同的问题,我尝试了提出的解决方案,但确实遇到了同样的问题。
I found someone facing same issue and I try the solution proposed but I did get extactly the same issue.
我尝试按照,我遇到了同样的问题(证据如下)。
I tried the exact sample provided in https://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views and I got the same issue (evidence bellow).
cqlsh:sample> CREATE TABLE scores
... (
... user TEXT,
... game TEXT,
... year INT,
... month INT,
... day INT,
... score INT,
... PRIMARY KEY (user, game, year, month, day)
... );
cqlsh:sample> CREATE MATERIALIZED VIEW alltimehigh AS
... SELECT user FROM scores
... WHERE game IS NOT NULL AND score IS NOT NULL AND user IS NOT NULL AND year IS NOT NULL AND month IS NOT NULL AND day IS NOT NULL
... PRIMARY KEY (game, score, user, year, month, day)
... WITH CLUSTERING ORDER BY (score desc);
SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:7 no viable alternative at input 'MATERIALIZED' ([CREATE] MATERIALIZED...)">
cqlsh:sample>
推荐答案
我不认为这是Cassandra中的选项2.X。我以为这是3.X规范(我们跳到3.11,效果还不错)。
I didn't think this was an option in Cassandra 2.X. I thought this was a 3.X spec (we jumped to 3.11 and it worked just fine).
这篇关于CQL查询中的语法错误] message =”行1:7输入'MATERIALIZED'([CREATE] MATERIALIZED)没有可行的选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!