Repository navigation
Python: convert every column type and encoding the engine outputs - #1360
Conversation
|
Note AI-generated summary. SummaryGoal. The Python client raised Approach. Where to look.
dataframeToNumpy
for each column
- switch (col->getKind()) # 55 hand-listed cases
- default: throw "unhandled column kind"
+ ColumnSingleDispatcher<OutputtedTypes::Allowed>::dispatch(col, convert)
+ convert(column)
+ constant toPyElement(value), repeated as an array or a list
+ numeric vector the vector itself, moved into numpy
+ other vector toPyElement(row) for each row, into an array or a listThe forms are the ones the switch produced, with one exception: a constant node or edge column is now a list, like a node or edge vector, instead of a raw Evidence
Run on main at Merge DangerDoor: two-way Reverting restores the switch. Nothing on disk or on the wire changes. Blast Radius: Python client Every query result from both Python clients goes through the new dispatch. Numeric vectors still move into numpy without a copy. A constant node or edge column comes back as a list (pandas reads both as |
a18a128 to
97517af
Compare
f0c327e to
5a84ac2
Compare
Convert every column type and encoding the engine outputs.