我创建了一个表
CREATE TABLE human (chromosome text, position bigint,
hg01583 frozen<set<text>>,
hg03006 frozen<set<text>>,
PRIMARY KEY (chromosome, position)
)
我创建了函数
CREATE FUNCTION process(sample list<frozen<set<text>>>)
CALLED ON NULL INPUT
RETURNS text
LANGUAGE java
AS
$$
return leftsample==null?null:leftsample.getClass().toString()+" "+leftsample.toString();
$$;
当我询问cql时
从人中选择染色体,位置,hg01583,hg03006,过程([hg01583,hg03006]);
我犯了这个错误
SyntaxException: line 1:80 no viable alternative at input ',' ([[hg01583],..
如何将hg01583、hg03006作为列表传递给处理函数?
1条答案
按热度按时间ht4b089n1#
每个都有自己的论点,比如:
SELECT chromosome, position, hg01583, hg03006, process(hg01583, hg03006) from human;
```CREATE FUNCTION process(hg01583 frozen<set>, hg03006 frozen<set>)
CALLED ON NULL INPUT
RETURNS text
LANGUAGE java AS
$$
return hg01583==null? null : ...
$$;
CREATE TABLE human (chromosome text, position bigint,
sample text,
value frozen<set>
PRIMARY KEY (chromosome, position, sample)
)