使用fixedLengthArrayVector出现BUG

stock_basic_oneminute.csv


使用以下代码

login("admin","123456")

//创建数据库
drop database if exists "dfs://TSMINUTE"
db = database(directory="dfs://TSMINUTE",partitionType=VALUE,partitionScheme=2010.01.01..2040.12.31,engine="TSDB")

//创建表
drop table if exists "dfs://TSMINUTE"."oneminute"
db = database(directory="dfs://TSMINUTE")
schema = table(1:0, `Timestamp`ThsCode`PreColse`ValOpen`ValHigh`ValLow`ValClose`Amount`Volume`TransNum`ValChange`ChangeRatio`Amplitude`AvgPrice`TurnoverRatio, [TIMESTAMP, SYMBOL, DECIMAL64(6), DECIMAL64(6), DECIMAL64(6), DECIMAL64(6), DECIMAL64(6), DECIMAL64(2), DECIMAL64(2), DECIMAL64(0), DECIMAL64(6), DECIMAL64(6), DECIMAL64(6), DECIMAL64(6), DECIMAL64(6)])
oneminute = db.createPartitionedTable(table=schema, tableName=`oneminute, partitionColumns=`Timestamp, compressMethods={Timestamp:"delta",PreColse:"lz4",ValOpen:"lz4",ValHigh:"lz4",ValLow:"lz4",ValClose:"lz4"},sortColumns=`ThsCode`Timestamp,keepDuplicates=LAST)


//导入单日分钟线
dataFilePath = "/dolphindb/importdata/stock_basic_oneminute.csv"
tmpTB = loadText(dataFilePath);


//写入单日数据
oneminute.append!(table(select  timestamp(string(date_trade)+"T"+string(time_trade)) as TIMESTAMP,thscode,decimal64( pre_close,6),decimal64(val_open,6),decimal64(val_high,6),decimal64(val_low,6),decimal64(val_close,6),amount,volume,trans_num,change,change_ratio,amplitude,avg_price,turnover_ratio from tmpTB))

//缓存数据写入
flushTSDBCache()

//select * from oneminute

//select Timestamp, PreColse, ValOpen from oneminute

t1=select Timestamp, fixedLengthArrayVector(PreColse,ValOpen)  from oneminute

select * from t1

出现错误如下:
> t1=select Timestamp, fixedLengthArrayVector(PreColse,ValOpen)  from oneminute
> select * from t1
-1


然后客户端类似断连状态

Received invalid header

Failed to connect to selected server: xx.xx.xx.xx 8081[xx.xx.xxx.xxx:8081]



请先 登录 后评论

2 个回答

wale

server是在运行在linux上吧,哪个版本?

请先 登录 后评论
Alex - dba

我这边没有问题,估计跟GUI版本太旧有关,请升级一下你的GUI版本。

请先 登录 后评论
  • 2 关注
  • 0 收藏,643 浏览
  • 黄生 提出于 2023-02-22 13:49

相似问题