Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Add support for bitwise operations. #564

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Add support for bitwise operations. #564

merged 1 commit into from
Jul 20, 2023

Conversation

ienkovich
Copy link
Contributor

Covers C++ and PyHDK API but not Calcite.

Related to #542.

Copy link
Contributor

@kurapov-peter kurapov-peter left a comment

Choose a reason for hiding this comment

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

Looks good, some typos


BuilderExpr bwOr(const BuilderExpr& rhs) const;
BuilderExpr bwOr(int val) const;
BuilderExpr bwOr(int64_t val) const;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use explicit bit width everywhere? I'd expect either int32_t with int64_t or int with long long; the latter should be incorrect in our case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

int and int64_t overloads match all other similar functions. We can use int32_t and int64_t instead, but it should be done globally then, not only for bitwise operations.

python/pyhdk/hdk.py Outdated Show resolved Hide resolved
python/pyhdk/hdk.py Outdated Show resolved Hide resolved
python/pyhdk/hdk.py Outdated Show resolved Hide resolved
python/pyhdk/hdk.py Outdated Show resolved Hide resolved
Copy link
Contributor

@kurapov-peter kurapov-peter left a comment

Choose a reason for hiding this comment

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

Looks good. Should we include any arguments restrictions/assumptions in the inline doc?

@ienkovich ienkovich merged commit 32ed024 into main Jul 20, 2023
20 checks passed
@ienkovich ienkovich deleted the ienkovich/bitwise branch July 20, 2023 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants