MrPowers commented on code in PR #238:
URL: https://github.com/apache/sedona-db/pull/238#discussion_r2460728140


##########
docs/delta-lake.ipynb:
##########
@@ -65,13 +65,11 @@
    "outputs": [],
    "source": [
     "countries.to_view(\"countries\")\n",
-    "df = sd.sql(\"select name, continent, ST_AsText(geometry) as geometry_wkt 
from countries\")\n",
+    "df = sd.sql(\n",
+    "    \"select name, continent, ST_AsText(geometry) as geometry_wkt from 
countries\"\n",
+    ")\n",
     "table_path = \"/tmp/delta_with_wkt\"\n",
-    "write_deltalake(\n",
-    "    table_path,\n",
-    "    df.to_pandas(),\n",
-    "    mode=\"overwrite\"\n",
-    ")"
+    "write_deltalake(table_path, df.to_pandas(), mode=\"overwrite\")"

Review Comment:
   Got this error when I changed from `df.to_pandas()` => `df`:
   
   ```
   ValueError                                Traceback (most recent call last)
   Cell In[7], line 6
         2 df = sd.sql(
         3     "select name, continent, ST_AsText(geometry) as geometry_wkt 
from countries"
         4 )
         5 table_path = 
"[/tmp/delta_with_wkt](http://localhost:8889/tmp/delta_with_wkt)"
   ----> 6 write_deltalake(table_path, df, mode="overwrite")
   
   File 
[/opt/miniconda3/lib/python3.12/site-packages/deltalake/writer.py:306](http://localhost:8889/opt/miniconda3/lib/python3.12/site-packages/deltalake/writer.py#line=305),
 in write_deltalake(table_or_uri, data, schema, partition_by, mode, 
file_options, max_partitions, max_open_files, max_rows_per_file, 
min_rows_per_group, max_rows_per_group, name, description, configuration, 
schema_mode, storage_options, partition_filters, predicate, target_file_size, 
large_dtypes, engine, writer_properties, custom_metadata, 
post_commithook_properties)
       300 data, schema = _convert_data_and_schema(
       301     data=data,
       302     schema=schema,
       303     conversion_mode=ArrowSchemaConversionMode.PASSTHROUGH,
       304 )
       305 data = RecordBatchReader.from_batches(schema, (batch for batch in 
data))
   --> 306 write_deltalake_rust(
       307     table_uri=table_uri,
       308     data=data,
       309     partition_by=partition_by,
       310     mode=mode,
       311     table=table._table if table is not None else None,
       312     schema_mode=schema_mode,
       313     predicate=predicate,
       314     target_file_size=target_file_size,
       315     name=name,
       316     description=description,
       317     configuration=configuration,
       318     storage_options=storage_options,
       319     writer_properties=writer_properties,
       320     custom_metadata=custom_metadata,
       321     post_commithook_properties=post_commithook_properties,
       322 )
       323 if table:
       324     table.update_incremental()
   
   ValueError: C Data interface error: The datatype ""vu"" is still not 
supported in Rust implementation
   ```



-- 
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]

Reply via email to