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

Fix issue-2343 #2366

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Fix issue-2343 #2366

merged 1 commit into from
Nov 8, 2023

Conversation

andyfengHKU
Copy link
Contributor

Fix issue #2343

The problem is because we use LogicalType to check if a variable is a Node/RelExpression or not. This is no longer true for the case of UNWIND, e.g. MATCH (a) WITH collect(a) AS b UNWIND b AS c RETURN c, c has LogicalType NODE but is not a NodeExpression.

In this PR we introduce PATTERN expression type to differentiate the above case. With this PR, a will be treated as an expression with ExpressionType PATTERN and LogicalType NODE while c will be treated as an expression with ExpressionType VARIABLE and LogicalType NODE.

In addition, we use enum class for ExpressionType

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (3f7fb1b) 90.76% compared to head (1831aca) 90.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2366      +/-   ##
==========================================
+ Coverage   90.76%   90.80%   +0.03%     
==========================================
  Files        1016     1015       -1     
  Lines       35710    35730      +20     
==========================================
+ Hits        32412    32444      +32     
+ Misses       3298     3286      -12     
Files Coverage Δ
src/binder/bind/bind_file_scan.cpp 98.38% <100.00%> (ø)
src/binder/bind/bind_projection_clause.cpp 93.57% <100.00%> (+0.18%) ⬆️
src/binder/bind/bind_updating_clause.cpp 98.46% <100.00%> (+3.04%) ⬆️
...binder/bind_expression/bind_boolean_expression.cpp 100.00% <100.00%> (ø)
...rc/binder/bind_expression/bind_case_expression.cpp 100.00% <100.00%> (ø)
...der/bind_expression/bind_comparison_expression.cpp 100.00% <100.00%> (ø)
...inder/bind_expression/bind_function_expression.cpp 98.14% <100.00%> (+0.04%) ⬆️
src/binder/expression/expression.cpp 88.88% <100.00%> (ø)
src/binder/expression/expression_util.cpp 85.18% <100.00%> (+3.36%) ⬆️
src/binder/expression_binder.cpp 95.23% <100.00%> (ø)
... and 34 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andyfengHKU andyfengHKU merged commit 7ed4bab into master Nov 8, 2023
12 checks passed
@andyfengHKU andyfengHKU deleted the issue-2343 branch November 8, 2023 06:53
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.

2 participants