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

Traversal operator for filtering (AIP-160) #171

Open
brk0v opened this issue Sep 6, 2022 · 7 comments
Open

Traversal operator for filtering (AIP-160) #171

brk0v opened this issue Sep 6, 2022 · 7 comments

Comments

@brk0v
Copy link

brk0v commented Sep 6, 2022

Hi team,

First of all thank you for open sourcing the support of AIPs, it's amazing work.

I have a question about the AIP-160 Filtering AIP. It seem, that you don't support the dot notation for traversal operator (a.b.c = "foo").

I'd appreciate any your suggestions where to take a look in order to add it? If it's even possible in your code structure?

Thanks and have a great day!

@brk0v brk0v changed the title Traversal operator Traversal operator for filtering (AIP-160) Sep 6, 2022
@zchenyu
Copy link

zchenyu commented Mar 9, 2023

+1 on this!

@ericwenn
Copy link
Member

Hello @brk0v,

Adding this should require a new Declaration and support in the parser, that's all I know for now.
If I recall correctly there were limitations in the cel-go library used that was a blocker, but that might have changed now.

@jsocol
Copy link

jsocol commented Apr 13, 2023

We've been able to make traversal work in the Checker by adding the whole path as an identifier, e.g. filtering.DeclareIdent("a.b.c", filtering.TypeString). I haven't encountered an issue in parsing. "a.b" will return a "Select" expr.Expr, e.g. if sel := exp.GetSelectExpr(); sel != nil { fmt.Println(sel.GetMember()) }

Copy link

This issue has been open for 365 days with no activity. Marking as stale.

@github-actions github-actions bot added the Stale label Apr 15, 2024
@nmittler
Copy link

@ericwenn any thoughts on the solution proposed by @jsocol above?

@ericwenn
Copy link
Member

@nmittler I don't actively work with this repository any more, so may be a bit rusty.

It sounds like that is a way forward. Are you open for trying it out?
Hopefully @odsod can help you out with a review if you take it on!

@github-actions github-actions bot removed the Stale label Jun 3, 2024
@newtonnthiga
Copy link

Hi,

Has the solution mentioned above been implemented yet?

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

No branches or pull requests

6 participants