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

disable agg function in ngql's yield clause & where clause #3597

Merged
merged 3 commits into from
Dec 31, 2021

Conversation

nevermore3
Copy link
Contributor

@nevermore3 nevermore3 commented Dec 29, 2021

What type of PR is this?

  • bug
  • feature
  • enhancement

What does this PR do?

Which issue(s)/PR(s) this PR relates to?

Special notes for your reviewer, ex. impact of this fix, etc:

Additional context/ Design document:

Checklist:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the corresponding label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

                                                            `

@nevermore3 nevermore3 added the type/bug Type: something is unexpected label Dec 29, 2021
@nevermore3 nevermore3 added this to the v3.0.0 milestone Dec 29, 2021
Shylock-Hg
Shylock-Hg previously approved these changes Dec 29, 2021
@Shylock-Hg
Copy link
Contributor

I think you could remove related checking code in validator.

@nevermore3
Copy link
Contributor Author

I think you could remove related checking code in validator.

done

@@ -152,8 +152,7 @@ Status FetchEdgesValidator::validateYield(const YieldClause *yield) {
auto pool = qctx_->objPool();
auto *newCols = pool->add(new YieldColumns());
for (auto col : yield->columns()) {
if (ExpressionUtils::hasAny(col->expr(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Now support path build expression?

Copy link
Contributor Author

@nevermore3 nevermore3 Dec 29, 2021

Choose a reason for hiding this comment

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

pathbuildExpression Is used internally, and the user cannot construct it

Shylock-Hg
Shylock-Hg previously approved these changes Dec 29, 2021
@nevermore3 nevermore3 added the ready-for-testing PR: ready for the CI test label Dec 30, 2021
@nevermore3 nevermore3 force-pushed the disable_agg_in_yield_clause branch 3 times, most recently from 80698e5 to 28d18bc Compare December 30, 2021 06:32
Shylock-Hg
Shylock-Hg previously approved these changes Dec 30, 2021
@@ -691,12 +691,12 @@ Feature: Basic Aggregate and GroupBy
"""
GO FROM "Tim Duncan" OVER like YIELD count(*)
"""
Then a SemanticError should be raised at runtime: `count(*)' is not support in go sentence.
Then a SyntaxError should be raised at runtime: Invalid use of aggregating function in yield clause. near `count(*)'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why disable this usage?

Copy link
Contributor Author

@nevermore3 nevermore3 Dec 30, 2021

Choose a reason for hiding this comment

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

This was not allowed before, and using agg funciton in ngql 's yield clause is meaningless, we can use agg function in yield sentence

jievince
jievince previously approved these changes Dec 30, 2021
@CPWstatic CPWstatic merged commit 7c5e431 into vesoft-inc:master Dec 31, 2021
@nevermore3 nevermore3 deleted the disable_agg_in_yield_clause branch December 31, 2021 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review ready-for-testing PR: ready for the CI test type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants