Skip to content

Update ClickBench queries to avoid to_timestamp_seconds - #15475

Merged
Dandandan merged 2 commits into
apache:mainfrom
acking-you:issue-15465
Mar 29, 2025
Merged

Dandandan merged 2 commits into
apache:mainfrom
acking-you:issue-15465

Conversation

@acking-you

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@adriangb adriangb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Since we're only ordering by this it shouldn't matter that we order by an integer instead of a proper timestamp, ordering is equivalent.

@adriangb

Copy link
Copy Markdown
Contributor

Should we update the same query in the clickbench repo as well?

@Dandandan

Copy link
Copy Markdown
Contributor

Should we update the same query in the clickbench repo as well?

Yes, and we might rerun the queries as well (as to_timestamp_seconds takes some time itself as well).

@acking-you

acking-you commented Mar 28, 2025 •

Copy link
Copy Markdown
Contributor Author

Looks good to me. Since we're only ordering by this it shouldn't matter that we order by an integer instead of a proper timestamp, ordering is equivalent.

Thank you very much for your reply, but I have a question: why can't the following order by "EventTime" be modified? It seems that they are equivalent (since the default is UTC timestamps). And both ClickHouse and duckdb do this way: duckdb clickhouse @adriangb

@adriangb

Copy link
Copy Markdown
Contributor

Looks good to me. Since we're only ordering by this it shouldn't matter that we order by an integer instead of a proper timestamp, ordering is equivalent.

Thank you very much for your reply, but I have a question: why can't the following order by "EventTime" be modified? It seems that they are equivalent (since the default is UTC timestamps). And both ClickHouse and duckdb do this way: duckdb clickhouse

I'm agreeing with you! I think this change is good 😄

@acking-you

Copy link
Copy Markdown
Contributor Author

I have also made changes to the query in ClickBench: clickbench-pr
@Dandandan @adriangb

@adriangb

Copy link
Copy Markdown
Contributor

@Dandandan do you think we can merge this here?

@Dandandan
Dandandan merged commit 9071503 into apache:main Mar 29, 2025
@Dandandan

Copy link
Copy Markdown
Contributor

Thank you @acking-you

nirnayroy pushed a commit to nirnayroy/datafusion that referenced this pull request May 2, 2025
* Update ClickBench queries to avoid to_timestamp_seconds

* change more unnecessary type conversions
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.

Update ClickBench queries to avoid to_timestamp_seconds

3 participants