提交 b09750fe 编写于 作者: wmmhello's avatar wmmhello

fea:add tag default name in schemaless

上级 7fc2e880
......@@ -726,9 +726,6 @@ static int64_t smlGetTimeValue(const char *value, int32_t len, int8_t type) {
if(value + len != endPtr){
return -1;
}
if(tsInt64 == 0){
return taosGetTimestampNs();
}
double ts = tsInt64;
switch (type) {
case TSDB_TIME_PRECISION_HOURS:
......@@ -794,8 +791,8 @@ static int8_t smlGetTsTypeByPrecision(int8_t precision) {
}
static int64_t smlParseInfluxTime(SSmlHandle* info, const char* data, int32_t len){
if(len == 0){
return taosGetTimestamp(TSDB_TIME_PRECISION_NANO);
if(len == 0 || (len == 1 && data[0] == '0')){
return taosGetTimestampNs();
}
int8_t tsType = smlGetTsTypeByPrecision(info->precision);
......@@ -817,6 +814,9 @@ static int64_t smlParseOpenTsdbTime(SSmlHandle* info, const char* data, int32_t
smlBuildInvalidDataMsg(&info->msgBuf, "timestamp can not be null", NULL);
return -1;
}
if(len == 1 && data[0] == '0'){
return taosGetTimestampNs();
}
int8_t tsType = smlGetTsTypeByLen(len);
if (tsType == -1) {
smlBuildInvalidDataMsg(&info->msgBuf, "timestamp precision can only be seconds(10 digits) or milli seconds(13 digits)", data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册