Juntao Wang
Juntao Wang

性别: 注册于 2021-05-07

向TA求助
0金币数
2730 经验值
0个粉丝
主页被访问 2314 次

254 个回答

0 赞同

针对某个用户赋权,一个库表赋予所有权限,其余库表赋予只读权限...

测试代码如下: /* 创建三个分布式表: dfs://test_1/test_1 dfs://test_2/test_2 dfs://test_3/test_3 */ def createDBAndTable(dbName, tbName) { db = database(dbName, VALUE, 0..1) model = table(1:0, `id`value, [INT, FLOAT]) createPartitionedTable(db, model, tbName, `id) append!(loadTable(db, tbName),...

回答于 2022-06-11 21:59

0 赞同

如何查看当前连接数目?

查看当前节点连接: getConnections() 查看当前集群中所有数据节点连接: // 方式1 pnodeRun(getConnections) // 方式2 rpc(getControllerAlias(), getClusterPerf).connectionNum

回答于 2022-06-11 21:55

0 赞同

查询字段很多,不想一一列举,如何实现?

使用元编程方式,动态传入、解析列名Vector。 示例代码如下: t = table(1 as Volume1, 2 as Volume2, 3 as Volume3, 4 as Volume4, 5 as Volume5, 6 as Volume6, 7 as Volume7, 8 as Volume8, 9 as Volume9, 10 as Volume10) sql(select=sqlCol("Volume" + string(1..10)), from=t).eval()

回答于 2022-06-02 18:38

0 赞同

查询时报错:Two objects in an expression must be connected b...

t = table(1..5 as `202120, 1..5 as value) select round(202120, 4) 202120 from t // 错误 select round(_"202120", 4) `202120 from t // 正确 查询时,如果数字开头列名,需要使用_这种方式。

回答于 2022-06-02 18:31

0 赞同

如何从一个向量中移除最后一个元素?

使用pop!函数,详见用户手册:pop! v = [1, 2, 3] pop!(v)

回答于 2022-06-02 18:23

0 赞同

构造一个table时,列名如何参数化?

示例代码如下: def getRes(res_name, col_name) { dict_res = dict(`吊牌销售额`期初库存额`在途订单`可用库存, 1.0 2.0 3.0 4.0) return table(sqlColAlias(<dict_res[res_name]>, col_name).eval()) } res_name = `期初库存额 col_name = `指标值 getRes(res_name, col_name)

回答于 2022-06-02 18:21

0 赞同

C++ API写入数据时Server报错:VectorUnmarshall::start Invalid...

form 5 表示字典,其余各个数字含义详见:数据形式 type 0 表示空值即NULL,其余各个数字含义详见:数据类型 这个错误含义是说,API 端构造的数据存在问题,导致Server 端无法反序列化。建议看下哪个字段是字典且赋了空值,尝试修改下这个字段,然后重新写入试下。

回答于 2022-06-02 09:21

0 赞同

GUI Add Server对话框Remote Directory什么含义?

Remote Directory 这个字段不为空时,我们右键选中一个脚本或者一个目录,Synchronize to server 子菜单会高亮显示,我们可以同步一个脚本或者目录到Remote Directory 指定目录下,然后通过 run scripts 这种方式运行脚本。

回答于 2022-06-02 09:16

0 赞同

如何能够知道自定义函数间的调用关系?

示例代码如下: foo 调用了funcB,查看funcB 被哪些函数调用。 def funcB(a) { return a * 2 } def foo(a) { return 1 + funcByName(a) } select name from defs() where userDefined = true, each(x -> funcByName(x).string(), name) like "%funcB%"

回答于 2022-06-02 09:13

0 赞同

缓存清理采用LRU还是FIFO算法?清理时,是否会类似stop the worl...

使用clearAllCache 一次性异步清理所有缓存,包括:分布式表已经载入内存中的数据,以及分布式计算Map Reduce任务的中间结果。根据warningMemSize 自动清理的话,使用的是LRU算法。 不会stop the world。

回答于 2022-06-02 09:05