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

feat(duckdb): Add more Postgres operators #4199

Merged
merged 3 commits into from
Oct 3, 2024
Merged

Conversation

VaggelisD
Copy link
Collaborator

Fixes #4189

The ^@ operator is an alias of the STARTS_WITH(a, b) function:

──────────────┬────────────────────┬─────────┬──────────────────┬──────────────────┬──────────┬──────────────┬────────────────────────┬────────────┐
│ database_name │ database_oid │ schema_name │ function_name │ function_type │                   description                    │ comment │ tags │ return_type │       parameters        │  parameter_types   │ varargs │ macro_definition │ has_side_effects │ internal │ function_oid │        example         │ stability  │
├───────────────┼──────────────┼─────────────┼───────────────┼───────────────┼──────────────────────────────────────────────────┼─────────┼──────┼─────────────┼─────────────────────────┼────────────────────┼─────────┼──────────────────┼──────────────────┼──────────┼──────────────┼────────────────────────┼────────────┤
│ system        │ 0            │ main        │ ^@            │ scalar        │ Returns true if string begins with search_string │         │ {}   │ BOOLEAN     │ [string, search_string] │ [VARCHAR, VARCHAR] │         │                  │ false            │ true     │ 428          │ starts_with('abc','a') │ CONSISTENT │
│ system        │ 0            │ main        │ starts_with   │ scalar        │ Returns true if string begins with search_string │         │ {}   │ BOOLEAN     │ [string, search_string] │ [VARCHAR, VARCHAR] │         │                  │ false            │ true     │ 994          │ starts_with('abc','a') │ CONSISTENT │
└───────────────┴──────────────┴─────────────┴───────────────┴───────────────┴──────────────────────────────────────────────────┴─────────┴──────┴─────────────┴─────────────────────────┴────────────────────┴─────────┴──────────────────┴──────────────────┴──────────┴──────────────┴────────────────────────┴────────────┘

All other operators seem to be borrowed by Postgres, so this PR extends/moves their definitions to the base dialect.

Docs

Postgres operators | DuckDB Text operators/functions

@VaggelisD VaggelisD changed the title feat(duckdb): Add more operators feat(duckdb): Add more Postgres operators Oct 2, 2024
Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just that one comment

@VaggelisD VaggelisD merged commit 5781b45 into main Oct 3, 2024
6 checks passed
@VaggelisD VaggelisD deleted the vaggelisd/duckdb_operators branch October 3, 2024 15:23
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.

DuckDB !~~, !~~*, &&, **, <@, @>, ^@ operators are not parsed
3 participants