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 json_extract function in UPDATE statement #5445

Closed
yixinglu opened this issue Mar 28, 2023 · 3 comments · Fixed by #5457
Closed

Support json_extract function in UPDATE statement #5445

yixinglu opened this issue Mar 28, 2023 · 3 comments · Fixed by #5457
Assignees
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@yixinglu
Copy link
Contributor

refer https://discuss.nebula-graph.com.cn/t/topic/12592

@yixinglu yixinglu added the type/bug Type: something is unexpected label Mar 28, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Mar 28, 2023
@wey-gu
Copy link
Contributor

wey-gu commented Mar 28, 2023

@yixinglu update now cannot take variables/be in pipeline, this is a quite high-demand feature as we don't support merge like expression, could we also support this together with this?

#2938

@xtcyclist
Copy link
Contributor

xtcyclist commented Mar 28, 2023

It's not json_extract that is not supported. It's Expression::Kind::kSubscript . Not sure whether we could lift this ban. This may not be counted as a bug.

I'm advisiting not to lift this ban. I think kSubscript isn't ok for update. An update better carries what it want to change explicitly.

std::unordered_set<Expression::Kind> invalidExprs{
      Expression::Kind::kVersionedVar,
      Expression::Kind::kVarProperty,
      Expression::Kind::kInputProperty,
      // Expression::Kind::kLabelAttribute, valid only for update edge
      Expression::Kind::kSubscript,
      Expression::Kind::kUUID,
      Expression::Kind::kTagProperty,
      Expression::Kind::kLabelTagProperty,
      Expression::Kind::kDstProperty,
      Expression::Kind::kEdgeSrc,
      Expression::Kind::kEdgeType,
      Expression::Kind::kEdgeRank,
      Expression::Kind::kEdgeDst,
  };

@yixinglu
Copy link
Contributor Author

I think it's a bug, we'd better to fix it since user could not use pipe and variable to update and there's no other way to meet their needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants