iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

Time or Timestamp should not be required as the first column in insert SQL statement

Open jiazhili-dawnlight opened this issue 4 years ago • 5 comments

support

insert into root.test2.wf01.wt0 (time,json ,`status` ) values (111,"abcddf" ,true  )

but not support

insert into root.test2.wf01.wt01 (json ,`status`,time ) values ("abcddf" ,true,111  )

get error msg

Msg: 401: line 1:34 mismatched input 'json' expecting {'.', '('}

jiazhili-dawnlight avatar Sep 24 '20 09:09 jiazhili-dawnlight

hi, yes, we require the first column as time in an insert SQL... Any strong requirements for changing the position?

jixuan1989 avatar Sep 24 '20 13:09 jixuan1989

I am developing an ORM tool . If the time must be in the first column, many popular ORM tools (hiberante,jpa,Spring Data)will not be able to integrate iotdb.

jiazhili-dawnlight avatar Sep 25 '20 02:09 jiazhili-dawnlight

yes, I think we can modify our Antlr parser to support that. By the way, are you familiar with antlr4? I believe it is not a big modification.

jixuan1989 avatar Sep 25 '20 07:09 jixuan1989

i familiar with antlr4 ....

jiazhili-dawnlight avatar Sep 30 '20 05:09 jiazhili-dawnlight

hi, yes, we require the first column as time in an insert SQL... Any strong requirements for changing the position?

this situation occurs again in release 0.11.0, should we write this description in the UserGuide?

rhmangmang avatar Nov 23 '20 15:11 rhmangmang

Hi, I'd like to do this by modifying the 'insertColumnsSpec' in 'IoTDBSqlParser'. Would you mind assign the issue to me? @qiaojialin @HTHou @jixuan1989

gofow avatar Feb 24 '23 06:02 gofow

Fixed by https://github.com/apache/iotdb/pull/12074

HTHou avatar Feb 28 '24 03:02 HTHou