xixipi-lining commented on code in PR #550:
URL: https://github.com/apache/iceberg-go/pull/550#discussion_r2307879497
##########
table/locations_test.go:
##########
@@ -74,3 +74,14 @@ func TestLocationProviderMetadataFileLocationCustomPath(t
*testing.T) {
require.NoError(t, err)
assert.Equal(t,
"s3://table-location/custom/path/00001-30313233-3435-4637-b839-616263646566.metadata.json",
loc)
}
+
+func TestObjectStoreLocationProvider(t *testing.T) {
+ provider, err := table.LoadLocationProvider("table_location",
+ iceberg.Properties{table.ObjectStoreEnabledKey: "true"})
+ require.NoError(t, err)
+
+ assert.Equal(t, "table_location/data/0101/0110/1001/10110010/a",
provider.NewDataLocation("a"))
+ assert.Equal(t, "table_location/data/1110/0111/1110/00000011/b",
provider.NewDataLocation("b"))
+ assert.Equal(t, "table_location/data/0010/1101/0110/01011111/c",
provider.NewDataLocation("c"))
+ assert.Equal(t, "table_location/data/1001/0001/0100/01110011/d",
provider.NewDataLocation("d"))
Review Comment:
Thanks for the feedback! I’ve added the test case to verify the behavior
when partitioned paths are disabled.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]