Robert Schulze
246e29a41a
Add 16/32-byte integer support
2023-10-13 14:54:56 +00:00
Robert Schulze
b7936cb953
Update src/Functions/byteSwap.cpp
...
Co-authored-by: Priyansh Agrawal <agrawal.priyansh@yahoo.in>
2023-10-10 23:45:57 +02:00
Robert Schulze
96e3a4f9b4
Update src/Functions/byteSwap.cpp
...
Co-authored-by: Priyansh Agrawal <agrawal.priyansh@yahoo.in>
2023-10-10 23:45:23 +02:00
Robert Schulze
31ae84604f
Some fixups
2023-10-10 09:54:06 +00:00
Priyansh Agrawal
9677dedd87
Add negative tests.
...
Also:
- Add comments in tests.
- Add an example in docs where an IPv4 is casted to an int, byteswapped
and then casted back to an IPv4.
2023-10-09 21:52:06 +00:00
Priyansh Agrawal
2c04370e5f
Use std::byteswap instead of custom implementations.
...
- Also allow signed ints now because std::byteswap accepts them.
- Fix for style check.
2023-10-07 23:59:24 +00:00
Priyansh Agrawal
302291e17b
Address a few review comments.
...
- Consider byteswap injective.
- Make function case-insensitive.
- Add in-code documentation and copy-paste it to the markdown docs.
2023-10-07 23:05:07 +00:00
Priyansh Agrawal
ed2c85bbce
Remove comment
2023-10-06 19:35:11 +00:00
Priyansh Agrawal
540d966033
Docs and comment
2023-10-02 22:51:58 +01:00
Priyansh Agrawal
46fbe00c9a
Implement byteswap for following dtypes.
...
UInt[8|16|32|64]
TODOs:
- Improve NOT_IMPLEMENTED error message.
- Add implementation for FixedStrings (reverse the bytes).
- See whether this needs to be implemented for UInt[128|256] and
signed integers as well.
2023-10-02 19:02:33 +01:00
Priyansh Agrawal
f27a76b923
Add function byteSwap
.
...
byteSwap accepts an integer `operand` and returns the integer which is
obtained by swapping the **endianness** of `operand` i.e. reversing the
bytes of the `operand`.
Issue: #54734
2023-09-24 21:02:09 +01:00