Sql DELETE with have dynamic fields in condition子句似乎不适用于phoenix

Sql DELETE with have dynamic fields in condition子句似乎不适用于phoenix,sql,apache,phoenix,Sql,Apache,Phoenix,我试图通过指定动态字段来删除ApachePhoenix中的行。 以下是一个例子: 假设我们使用以下模式创建测试表: create table "test" ("id" INTEGER not null primary key, "staticColumn" VARCHAR); 然后像这样插入一行 upsert into "test" ("id", "staticColumn", "dynamicColumn" VARCHAR) values (0, 'static', 'dynamic');

我试图通过指定动态字段来删除ApachePhoenix中的行。 以下是一个例子: 假设我们使用以下模式创建测试表:

create table "test" ("id" INTEGER not null primary key, "staticColumn" VARCHAR);
然后像这样插入一行

upsert into "test" ("id", "staticColumn", "dynamicColumn" VARCHAR) values (0, 'static', 'dynamic');
然后根据文档,我可以通过以下方式搜索:

select * from "test"("dynamicColumn" VARCHAR)  where "dynamicColumn" = 'dynamic';
但我只能通过以下方式删除:

delete from "test" where "staticColumn" = 'static';
不是通过:

delete from "test"("dynamicColumn" VARCHAR) where "dynamicColumn" = 'dynamic';
我收到的错误消息:

Error: ERROR 602 (42P00): Syntax error. Missing "EOF" at line 1, column 19. (state=42P00,code=602)
org.apache.phoenix.exception.PhoenixParserException: ERROR 602 (42P00): Syntax error. Missing "EOF" at line 1, column 19.
        at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
        at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1285)
        at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1366)
        at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1429)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:808)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: MissingTokenException(inserted [@-1,0:0='<missing EOF>',<-1>,1:18] at ()
        at org.apache.phoenix.parse.PhoenixSQLParser.recoverFromMismatchedToken(PhoenixSQLParser.java:350)
        at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
        at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:510)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
        ... 9 more

您应该向他们提交错误报告或功能请求,但作为一种解决方法:

从testdynamicColumn VARCHAR中选择id,其中dynamicColumn='dynamic'


它可以在列名周围使用或不使用双引号,这与错误消息无关

你能给出一个示例查询和错误消息吗?当然,好主意。让我补充一点。我对这个例子感到抱歉,但是我在这里举了一个错误的例子,尽管这也是我现在面临的一个问题。让我修改上下文以适合这里的示例,这样它可以作为人们的参考。