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 properties expression in WHERE clause for LOOKUP #4848

Open
wey-gu opened this issue Nov 10, 2022 · 6 comments
Open

support properties expression in WHERE clause for LOOKUP #4848

wey-gu opened this issue Nov 10, 2022 · 6 comments
Labels
type/enhancement Type: make the code neat or more efficient

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Nov 10, 2022

Introduction


(root@nebula) [basketballplayer]> LOOKUP ON player WHERE properties(vertex).name == "Tony Parker" YIELD properties(vertex).name as name
[ERROR (-1009)]: SemanticError: Expression (properties(VERTEX).name=="Tony Parker") not supported yet

By intuition, this is reasonable and we could infer that it's equivalent to player.mane == "Tony Parker", also, it's supported in GO to do WHERE properties($$) == "foo".

Plus, those who are building ORM/templating dev job will benefit from this, too.

Contents

https://discuss.nebula-graph.com.cn/t/topic/11126/12

Related work

@wey-gu wey-gu added the type/enhancement Type: make the code neat or more efficient label Nov 10, 2022
@BOFA1ex
Copy link

BOFA1ex commented Nov 10, 2022

The same as FETCH, WHERE properties(vertex) == 'foo' or WHERE player.name == 'foo' expressions are both supported.

It's necessary to make it(syntax) align.

struct LookupContext final : public AstContext {
  bool isEdge{false};
  bool dedup{false};
  bool isEmptyResultSet{false};
  int32_t schemaId{-1};
  Expression* filter{nullptr}; // using ExpressionProps repleace it?
  YieldColumns* yieldExpr{nullptr};
  std::vector<std::string> idxReturnCols;
  std::vector<std::string> idxColNames;
  // order by
};

@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 10, 2022

BTW @BOFA1ex , are you planning open-sourcing your downstream OGM ;)

@BOFA1ex
Copy link

BOFA1ex commented Nov 10, 2022

Exactly, the OGM framework is bound to our internal-biz product.
So i cannot give an answer, it's beyond my ability to decide whether open source is planned.

But i'm glad to make it nebula-contrib better together :)

@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 10, 2022

Thanks~~ And whenever you are considering splitting the OGM part and open-sourcing, let us know!

@BOFA1ex
Copy link

BOFA1ex commented Nov 14, 2022

It will consider compatible with 2.6.x~3.x? : upstream
cc @wey-gu

@BOFA1ex
Copy link

BOFA1ex commented Feb 15, 2023

It seems that it has become inactive, any planning as feature on next milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

2 participants