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

feat(query): add range function & aliases in select list #11621

Merged
merged 16 commits into from
May 31, 2023

Conversation

sundy-li
Copy link
Member

@sundy-li sundy-li commented May 30, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

  1. support range function to generate array
  2. make aliases work in select list:
    1. the latter expression in select list would respect the previous alias
    2. where/selection will prefer to fetch name from context, other clauses will prefer fetch aliases.
impl ExprContext {
  pub fn prefer_resolve_alias(&self) -> bool {
      !matches!(self, ExprContext::SelectClause | ExprContext::WhereClause)
  }
}

Closes #issue

@vercel
Copy link

vercel bot commented May 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
databend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2023 2:13am

@sundy-li sundy-li requested review from RinChanNOWWW and leiysky and removed request for RinChanNOWWW May 30, 2023 09:01
@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label May 30, 2023
@sundy-li
Copy link
Member Author

Dev lint will be fixed in #11629

@sundy-li sundy-li merged commit 538dcd8 into databendlabs:main May 31, 2023
@sundy-li sundy-li deleted the range-function branch May 31, 2023 02:39
andylokandy pushed a commit to andylokandy/databend that referenced this pull request Nov 27, 2023
…s#11621)

* feat(query): add range functions

* feat(query): add range functions

* feat(query): add range functions

* feat(query): add range functions

* feat(query): add range functions

* feat(query): add range functions

* feat(query): bind group context

* feat(query): remove allow_ambiguous

* feat(query): remove allow_ambiguous

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants