questdb icon indicating copy to clipboard operation
questdb copied to clipboard

strange insert

Open xdewx opened this issue 1 year ago • 4 comments

To reproduce

CREATE TABLE 'test' (
  id VARCHAR,
  name VARCHAR,
  type VARCHAR,
  num int,
  disabled BOOLEAN,
  created_at TIMESTAMP,
  updated_at TIMESTAMP
) timestamp (created_at) PARTITION BY HOUR WAL;

ALTER TABLE test add COLUMN age int;

INSERT INTO test  ( id, name, type, num, created_at )  VALUES (  'xxx', 'string', 'string', 10, now()  );

select * from test;

image

  1. why is num 0?
  2. why is updated_at 1970?

QuestDB version:

8.1.0

OS, in case of Docker specify Docker and the Host OS:

windows docker desktop

File System, in case of Docker specify Host File System:

ntfs

Full Name:

xdewx

Affiliation:

xdewx

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?

  • [X] Yes, I have

Additional context

No response

xdewx avatar Aug 09 '24 09:08 xdewx

affiliation disclosure is required

bluestreak01 avatar Aug 10 '24 18:08 bluestreak01

Worked on both 8.1.0 and master on M1.

@xdewx Did you encounter an error when adding the column, other issues? Your result set does not include the age column. Logs and other info would help. Plus affiliation information, as Vlad asks!

image

nwoolmer avatar Aug 12 '24 08:08 nwoolmer

Worked on both 8.1.0 and master on M1.

@xdewx Did you encounter an error when adding the column, other issues? Your result set does not include the age column. Logs and other info would help. Plus affiliation information, as Vlad asks!

image

sorry, my mistake, i did not exec alter clause to add colunn age. my english is very bad, what is affiliation?

is there some cache data leading to the result?

in fact, in my first test case, insert clause works as expected. but data inserted by mybatis-plus.save(Entity) will fail when @TableId(type=IdType.ASSIGN_UUID).

then i dropped the table test and recreate, finally strange thing happens

xdewx avatar Aug 12 '24 10:08 xdewx

@xdewx Affiliation means what company or organisation you work for :)

The insert statement works fine for me without the alter statement too.

Sounds like MyBatis is an ORM? The problem could lie either with the ORM, or with some caching of the prepared statement on our side. We don't test MyBatis.

Please can you give repro instructions with your actual code so we can try to reproduce?

nwoolmer avatar Aug 12 '24 11:08 nwoolmer