taosdata / taosdata/TDengine

syntax error in insert statement with operator

Open
#25,583 2 comments 0 reactions 1 assignee View on GitHub

@yu285 is already working on this.

Since May 11, 2025.

bug
Dominant language
C
Stars
25.1k
Forks
5k
Avg merge
4d 59m
Merged PRs (30d)
7

Description

tdengine 版本:3.2.3

问题1:
insert 语句中now + 0b 会语法异常,now + 1b 执行正常,now + 0u 或者 now + 0a 都执行正常

image

异常语句:
`insert into

        td_jd_record_device_event_Device_0_OrgCode_0_EventCode_0 USING
        td_jd_record_device_event TAGS('Device_0', 'OrgCode_0', 'EventCode_0')
        VALUES (now + 0b, 'DeviceInfoName_0', 'DeviceType_0', 'OrgName_0', 'EventId_0',
        '2023-04-11 09:00:00.0', 'EventType_0', 'EventTitle_0', 'EventInfo_0', 1,
        '2023-04-11 10:00:00.0', '2023-04-11 15:00:00.0', 'DealByName_0', 'DealType_0', 'DealOpinion_0',
        0, now, now);`

建表语句:
CREATE STABLE td_jd_record_device_event ( ts TIMESTAMP, device_info_name VARCHAR(64), device_type VARCHAR(32), org_name VARCHAR(64), event_id VARCHAR(32), event_time TIMESTAMP, event_type VARCHAR(32), event_title VARCHAR(32), event_info VARCHAR(256), event_process_state INT, report_time TIMESTAMP, deal_time TIMESTAMP, deal_by_name VARCHAR(32), deal_type VARCHAR(32), deal_opinion VARCHAR(256), send_state INT, create_time TIMESTAMP, modify_time TIMESTAMP ) TAGS ( device_code VARCHAR(32), org_code VARCHAR(32), event_code VARCHAR(32) )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.