Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOTDB-6305] Add show current_timestamp statement #12106

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

yx-zhang
Copy link
Contributor

@yx-zhang yx-zhang commented Mar 1, 2024

.collect(Collectors.toList());
TsBlockBuilder tsBlockBuilder = new TsBlockBuilder(outputDataTypes);
tsBlockBuilder.getTimeColumnBuilder().writeLong(0L);
tsBlockBuilder.getColumnBuilder(0).writeLong(System.currentTimeMillis());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any issue when the timestamp_precision is ns or us? @JackieTien97

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a long value, how to resolve this long value depends on the user. We can default return ms, in stardand sql, there will be a parameter called precision in current_timestamp function to decide whether to return ms, us or ns, so I think it's ok to defaultly return ms here and this function call's time precision should have nothing to do with our timestamp_precision configuration.

Copy link
Member

@Beyyes Beyyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qiaojialin qiaojialin merged commit 2b066d8 into apache:master Mar 2, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants