有什么方法可以在我的结果集下添加带有总计的行,例如 ms-sql ROLLUP 运算符?我想避免对这个总数使用额外的查询。
默认使用 Groovy 的 JVM 以及如何指定其他版本?
我的服务器的输出:
$ groovy --version
Groovy Version: 2.4.5 JVM: 1.7.0_95 Vendor: Oracle Corporation OS: Linux
$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
我有一个简单的表:
CREATE TABLE t1
(
v1 Int32,
a1 Array(Int32),
s2 Array(String)
) ENGINE = Memory
Run Code Online (Sandbox Code Playgroud)
但无法弄清楚如何插入String数组:
insert into t1 format CSV 1,"[1,2]","[a1,a2]"
Run Code Online (Sandbox Code Playgroud)
失败并显示以下错误:
Exception on client:
Code: 26. DB::Exception: Cannot parse quoted string: expected opening quote:
Could not print diagnostic info because two last rows aren't in buffer (rare case)
: (at row 1)
Run Code Online (Sandbox Code Playgroud)