zhangfengcdt commented on code in PR #44:
URL: https://github.com/apache/sedona-db/pull/44#discussion_r2335052906


##########
python/sedonadb/tests/test_context.py:
##########
@@ -63,7 +63,104 @@ def test_dynamic_object_stores():
     schema = pa.schema(con.read_parquet(url))
     assert schema.field("geometry").type.extension_name == "geoarrow.wkb"
 
-    # Fresh context
-    con = sedonadb.connect()
-    schema = pa.schema(con.sql(f"SELECT * FROM '{url}'"))
-    assert schema.field("geometry").type.extension_name == "geoarrow.wkb"
+
+def test_read_parquet_options_parameter(con, geoarrow_data):
+    """Test the options parameter functionality for read_parquet()"""
+    test_file = geoarrow_data / 
"quadrangles/files/quadrangles_100k_geo.parquet"
+
+    # Test 1: Backward compatibility - no options parameter
+    tab1 = con.read_parquet(test_file).to_arrow_table()
+    assert tab1["geometry"].type.extension_name == "geoarrow.wkb"
+
+    # Test 2: options=None (explicit None)
+    tab2 = con.read_parquet(test_file, options=None).to_arrow_table()
+    assert tab2["geometry"].type.extension_name == "geoarrow.wkb"
+    assert len(tab2) == len(tab1)  # Should be identical
+
+    # Test 3: Empty options dictionary
+    tab3 = con.read_parquet(test_file, options={}).to_arrow_table()
+    assert tab3["geometry"].type.extension_name == "geoarrow.wkb"
+    assert len(tab3) == len(tab1)  # Should be identical
+
+    # Test 4: Options with string values
+    tab4 = con.read_parquet(
+        test_file, options={"test.option": "value"}
+    ).to_arrow_table()
+    assert tab4["geometry"].type.extension_name == "geoarrow.wkb"
+    assert len(tab4) == len(
+        tab1
+    )  # Should be identical (option ignored but not errored)

Review Comment:
   Sure, I have removed the other tests and add a new one specific to S3 
anaonymous access: test_read_parquet_s3_anonymous_access



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