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

Extending BinaryOp/Operator support #15326

Open
waynexia opened this issue Mar 20, 2025 · 0 comments
Open

Extending BinaryOp/Operator support #15326

waynexia opened this issue Mar 20, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@waynexia
Copy link
Member

waynexia commented Mar 20, 2025

Is your feature request related to a problem or challenge?

There are some gaps between our Operator and BinaryOperator from sqlparser, where some of them are useful.

This ticket is not intended to align the gap between Operator and BinaryOperator. But to include those might-helpful operators with sqlparser as the reference. And further implement some of them (which means leaving another part just a placeholder, and even not included).

We can categorize our current Operators into three parts: fully supported (like AND/OR), included but not supported (like @>) and not included. This ticket focuses on extending the first two parts. And for some operators, it may take a relatively long time to fully support them. Like those for JSON operation. The meaning of listing them here is for rough progress tracking, and to push them into the "included but not implemented" stage for downstream projects to easily extend their version.

Describe the solution you'd like

Here is a table of various operators and their status:

Operator Description Status Tickets
Arrow (PG) -> extracts a JSON object field or array element Included But Not Implemented #15327,
LongArrow (PG) ->> extracts a JSON object field or JSON array element and converts it to text Included But Not Implemented #15327,
HashArrow (PG) #> extracts a JSON sub-object at the specified path Included But Not Implemented #15327,
HashLongArrow (PG) #>> extracts JSON sub-object at the specified path Included But Not Implemented #15327,
ArrowAt (PG) <@ is used for JSON and text searches 🚧 Available for array, not implemented for structs and text #6885, #15327,
AtArrow (PG) @> is used for JSON and text searches 🚧 Available for array, not implemented for structs and text #6885, #15327,
AtAt (PG) @@ is used for JSON and text searches Included But Not Implemented #15327,
XOR a XOR b. We've implemented BitwiseXor and can map this to BitwiseXor operator ✅ map to BitwiseXor #15327
DIV or // (MySQL/DuckDB) Integer division. Not Included
ALL SELECT 1 = ALL(ARRAY[1,1,1,1]); Unparsed
Question (PG) ? checks whether a string exists as a top-level key within the JSON value Included But Not Implemented #15327,
AtQuestion (PG) @? checks the given JSON path returns an item for the JSON value Included But Not Implemented #15327,
QuestionAnd (PG) ?& check whether all of the the indicated array members exist as top-level keys Included But Not Implemented #15327,
QuestionPipe (PG) ? checks whether any of the the indicated array members exist as top-level keys Included But Not Implemented #15327,

Feel free to add or modify it

Describe alternatives you've considered

No response

Additional context

Cross-references:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant