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

Feature: support basic select at statement #5516

Closed
Tracked by #5513
dantengsky opened this issue May 23, 2022 · 0 comments · Fixed by #5617
Closed
Tracked by #5513

Feature: support basic select at statement #5516

dantengsky opened this issue May 23, 2022 · 0 comments · Fixed by #5617
Labels
A-storage Area: databend storage C-feature Category: feature

Comments

@dantengsky
Copy link
Member

dantengsky commented May 23, 2022

Summary:

Enhance the select query, so that a time point can be specified, sth like this

select * from t at(offset => -2) as t where ...

https://docs.snowflake.com/en/sql-reference/constructs/at-before.html

A basic idea of impl (not a strict requirement, any other functionality equivalent impls are ok)

  • enhance the corresponding parser components
    encode the timepoint specification (the at(offset...) parts) into DfQueryStatement

  • carries the timepoint spec all the way to ToReadDataSourcePlan::read_plan_with_catalog

    • detects if the underlying table instance support time travel.
    • if it does, navigate there, and construct the ReadDataSourcePlan accordingly

    also see Feature: add timestamp field to table snapshot #5514

@dantengsky dantengsky changed the title Feature: support basic <code class="notranslate">select at ` statement Feature: support basic select at statement May 23, 2022
@dantengsky dantengsky added A-storage Area: databend storage C-feature Category: feature labels May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-storage Area: databend storage C-feature Category: feature
Projects
Status: 📦 Done
Development

Successfully merging a pull request may close this issue.

1 participant