Skip to content

Commit 2c03f49

Browse files
authored
chore: Cleaner handling of chunked array input into BaseArrowLayer.__init__ (#855)
1 parent 77ec77e commit 2c03f49

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lonboard/_layer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,10 @@ def __init__(
367367
table_o3 = imported_stream
368368
else:
369369
assert isinstance(imported_stream, ChunkedArray)
370-
field = imported_stream.field.with_name("geometry")
371-
schema = Schema([field])
372-
table = Table.from_arrays([imported_stream], schema=schema)
373-
table = add_positional_row_index(table)
370+
schema = Schema([imported_stream.field.with_name("geometry")])
371+
table_o3 = Table.from_arrays([imported_stream], schema=schema)
372+
table_o3 = add_positional_row_index(table_o3)
374373

375-
table_o3 = Table.from_arrow(table)
376374
parsed_tables = parse_serialized_table(table_o3)
377375
assert len(parsed_tables) == 1, (
378376
"Mixed geometry type input not supported here. Use the top "

0 commit comments

Comments
 (0)