Skip to content

Conversation

@ashayas
Copy link
Contributor

@ashayas ashayas commented Dec 29, 2024

This pull request introduces the bitwise OR operator which is complementary to the bitwise AND operator already present

Why:

  • The bitwise OR operator is a necessary complement to the existing bitwise AND operator already present in the repository. I followed the conventions and implementation patterns of the bitwise AND operator to ensure consistency and maintainability within the codebase. I wanted this implemented so that it can be updated in ChromaDB

Example Usage:

from pypika import Table, Field, Query

table = Table('example')
field1 = Field('field1')
field2 = Field('field2')

query = Query.from_(table).select(field1.bitwiseor(field2))
print(query)
# Output: SELECT "field1" | "field2" FROM "example"

Testing:

make test [PASS]
make docs.build [PASS]

Add tests for bitwise or
@ashayas ashayas requested a review from a team as a code owner December 29, 2024 21:02
@AzisK
Copy link
Contributor

AzisK commented Sep 23, 2025

Looking good. That for the work

@AzisK AzisK merged commit 89c1ef0 into kayak:master Sep 23, 2025
akhilnarang added a commit to frappe/pypika that referenced this pull request Sep 29, 2025
# By Ashaya Sharma (1) and others
# Via GitHub
* upstream/master:
  Initial support for JQL (kayak#721)
  Add bitwiseor support and class (kayak#825)
  Add qualify (kayak#841)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

# Conflicts:
#	pypika/dialects.py
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.

2 participants