File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1284,6 +1284,14 @@ def download_and_convert(
12841284 import polars as pl
12851285
12861286 return pl .read_json (buffer )
1287+ elif DependencyManager .pyarrow .has ():
1288+ import json
1289+
1290+ import pyarrow as pa
1291+
1292+ rows = json .loads (data_bytes )
1293+ assert isinstance (rows , list )
1294+ return pa .Table .from_pylist (rows )
12871295 elif format_type == "parquet" :
12881296 if DependencyManager .pandas .has ():
12891297 import pandas as pd
@@ -1293,6 +1301,10 @@ def download_and_convert(
12931301 import polars as pl
12941302
12951303 return pl .read_parquet (buffer )
1304+ elif DependencyManager .pyarrow .has ():
1305+ import pyarrow .parquet as pq
1306+
1307+ return pq .read_table (buffer )
12961308 elif format_type == "csv" :
12971309 if DependencyManager .pandas .has ():
12981310 import pandas as pd
@@ -1302,6 +1314,10 @@ def download_and_convert(
13021314 import polars as pl
13031315
13041316 return pl .read_csv (buffer )
1317+ elif DependencyManager .pyarrow .has ():
1318+ import pyarrow .csv as pacsv
1319+
1320+ return pacsv .read_csv (buffer )
13051321 raise ValueError (f"Unsupported format: { format_type } " )
13061322
13071323 # Test base downloads (full data)
You can’t perform that action at this time.
0 commit comments