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

support gql list/set/map #3302

Merged
merged 9 commits into from
Nov 30, 2021
Merged

support gql list/set/map #3302

merged 9 commits into from
Nov 30, 2021

Conversation

jievince
Copy link
Contributor

Close #2894

@jievince jievince added ready-for-testing PR: ready for the CI test doc affected PR: improvements or additions to documentation labels Nov 11, 2021
| 0 | 0 | 0 |
When executing query:
"""
RETURN 1 IN LIST[] AS a, "Tony" IN SET{} AS b, "a" IN MAP{} AS c
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add some nested cases, such as MAP{a: LIST[1,2], b: SET{1,2,1}, c: "hee"}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's ok

@jievince jievince force-pushed the gql-list branch 2 times, most recently from e36ad29 to fb3b67c Compare November 11, 2021 08:07
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2021

Codecov Report

Merging #3302 (7f2f1fc) into master (a14d7b4) will increase coverage by 0.01%.
The diff coverage is 68.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3302      +/-   ##
==========================================
+ Coverage   85.25%   85.27%   +0.01%     
==========================================
  Files        1279     1276       -3     
  Lines      118989   119005      +16     
==========================================
+ Hits       101445   101477      +32     
+ Misses      17544    17528      -16     
Impacted Files Coverage Δ
src/graph/context/QueryContext.cpp 100.00% <ø> (ø)
src/graph/executor/mutate/DeleteExecutor.cpp 83.22% <ø> (ø)
src/graph/executor/mutate/InsertExecutor.cpp 100.00% <ø> (ø)
src/graph/executor/mutate/UpdateExecutor.cpp 87.64% <ø> (ø)
src/graph/executor/query/IndexScanExecutor.h 100.00% <ø> (ø)
src/graph/executor/query/TraverseExecutor.h 100.00% <ø> (ø)
src/graph/service/GraphService.cpp 74.80% <ø> (ø)
src/graph/service/QueryEngine.h 100.00% <ø> (ø)
src/kvstore/raftex/RaftPart.cpp 72.87% <0.00%> (-0.17%) ⬇️
src/kvstore/raftex/RaftPart.h 98.30% <ø> (ø)
... and 65 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53c3c2f...7f2f1fc. Read the comment docs.

@@ -1191,12 +1192,27 @@ list_expression
: L_BRACKET expression_list R_BRACKET {
$$ = ListExpression::make(qctx->objPool(), $2);
}
| KW_LIST L_BRACKET opt_expression_list R_BRACKET {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the syntax proposed in the GQL draft?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but strangely, according to the syntax of gql, it still seems that empty list/set/map is not allowed.
image
image
image

@Shylock-Hg Shylock-Hg added the incompatible PR: incompatible with the recently released version label Nov 16, 2021
@jievince jievince requested a review from CPWstatic November 22, 2021 02:09
@CPWstatic CPWstatic merged commit 8872973 into vesoft-inc:master Nov 30, 2021
@jievince jievince deleted the gql-list branch November 30, 2021 02:05
@cooper-lzy cooper-lzy self-requested a review January 5, 2022 03:33
@Sophie-Xie Sophie-Xie removed the incompatible PR: incompatible with the recently released version label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc affected PR: improvements or additions to documentation ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support empty list/set/map
7 participants