TDengine
TDengine copied to clipboard
3.0 version,REST return uncompleted value
Bug Description 调用查询sql语句,反馈的结果项中,json某些字段不完整。 SQL:SELECT last_row(*) FROM tag_64657673696d750973696d756461746109626f6f6c30
To Reproduce Steps to reproduce the behavior: 1、创建名字很长的子表(符合要求 https://docs.taosdata.com/taos-sql/table/#%E5%88%9B%E5%BB%BA%E8%A1%A8) 2、进行last_row查询
Expected Behavior res.data.column_meta 结果中的列名,应完整。但目前似乎有长度限制被截取了。
Screenshots
{ "code": 0, "column_meta": [ [ "last_row(tag_64657673696d750973696d756461746109626f6f6c30.ts)", "TIMESTAMP", 8 ], [ "last_row(tag_64657673696d750973696d756461746109626f6f6c30.status", "INT", 4 ], [ "last_row(tag_64657673696d750973696d756461746109626f6f6c30.valuei", "BIGINT", 8 ], [ "last_row(tag_64657673696d750973696d756461746109626f6f6c30.valuef", "DOUBLE", 8 ], [ "last_row(tag_64657673696d750973696d756461746109626f6f6c30.valueb", "BOOL", 1 ], [ "last_row(tag_64657673696d750973696d756461746109626f6f6c30.values", "VARCHAR", 1024 ] ], "data": [ [ "2022-08-29T06:18:53.354Z", null, null, null, true, null ] ], "rows": 1 }
Environment (please complete the following information):
- OS: Ubuntu 22.04
- Memory, CPU, current Disk Space
- TDengine Version [e.g. 3.0.0.1]
Additional Context Add any other context about the problem here.
经length测量,REST反馈的column_meta中的name长度,似乎最大是64。
参考:https://docs.taosdata.com/taos-sql/limit/
参考:https://docs.taosdata.com/taos-sql/limit/
列名不超过64啊,只是REST的反馈结果里面,会把表名也拼在列名前面反馈,才导致超长的。
CREATE STABLE IF NOT EXISTS ${dbName}.tagOriginal
(
ts TIMESTAMP,
status INT,
valueInteger BIGINT,
valueFloat DOUBLE,
valueBoolean BOOL,
valueString BINARY(1024)
)
TAGS
(
edgeId nchar(128),
instance nchar(256),
tagName nchar(128)
)
@east0923 好的,谢谢您的 issue ,我们看一下如何解决。
在last_row(*)产生的多列输出的别名中去掉了表别名,提交版本为3.0分支d0669151af版本。