petern48 commented on code in PR #8:
URL: https://github.com/apache/sedona-db/pull/8#discussion_r2316906120
##########
python/sedonadb/python/sedonadb/testing.py:
##########
@@ -183,6 +188,10 @@ def result_to_tuples(self, result, *, wkt_precision=None)
-> List[Tuple[str]]:
# isinstance() does not always work with pyarrow in pytest
if _type_is_geoarrow(col.type):
columns.append(ga.format_wkt(col,
precision=wkt_precision).to_pylist())
+ elif datatype == "binary":
+ binary_lst = col.cast(pa.binary()).to_pylist()
+ # Convert to hex format for comparison e.g
b'0101000000000000000000F03F000000000000F03F',
+ columns.append([b.hex().upper().encode() for b in binary_lst])
Review Comment:
I found a cleaner way using the escaped binary strings
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]