We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77fdad5 commit 9fd301cCopy full SHA for 9fd301c
1 file changed
src/query_farm_server_base/flight_handling.py
@@ -1,4 +1,5 @@
1
import base64
2
+import io
3
import json
4
from collections.abc import Callable, Generator
5
from dataclasses import dataclass
@@ -78,6 +79,13 @@ def endpoint(
78
79
)
80
81
82
+def serialize_arrow_ipc_table(table: pa.Table) -> bytes:
83
+ sink = io.BytesIO()
84
+ with pa.ipc.new_stream(sink, table.schema) as writer:
85
+ writer.write_table(table)
86
+ return sink.getvalue()
87
+
88
89
def dict_to_msgpack_data_uri(data: dict[str, Any]) -> str:
90
"""
91
Convert a dictionary to a data URI with MessagePack encoding.
0 commit comments