karuppayya commented on a change in pull request #3094:
URL: https://github.com/apache/iceberg/pull/3094#discussion_r706981047
##########
File path: core/src/test/java/org/apache/iceberg/TestLocationProvider.java
##########
@@ -222,6 +222,32 @@ public void
testObjectStorageLocationProviderPathResolution() {
Assert.assertTrue("default data location should be used when object
storage path not set",
table.locationProvider().newDataLocation("file").contains(table.location() +
"/data"));
+ String objectPath = "s3://random/object/location";
+ table.updateProperties()
+ .set(TableProperties.OBJECT_STORE_PATH, objectPath)
+ .commit();
+
+ Assert.assertTrue("object storage path should be used when set",
+ table.locationProvider().newDataLocation("file").contains(objectPath));
+
+ String dataPath = "s3://random/data/location";
+ table.updateProperties()
+ .set(TableProperties.WRITE_DATA_LOCATION, dataPath)
+ .commit();
+
+ Assert.assertTrue("object storage path should be used when set",
Review comment:
nit: should this be `write data should be used when set`?
##########
File path:
spark3/src/main/java/org/apache/iceberg/spark/actions/BaseSnapshotTableSparkAction.java
##########
@@ -167,7 +167,7 @@ public SnapshotTable tableProperty(String property, String
value) {
// remove any possible location properties from origin properties
properties.remove(LOCATION);
properties.remove(TableProperties.WRITE_METADATA_LOCATION);
- properties.remove(TableProperties.WRITE_FOLDER_STORAGE_LOCATION);
+ properties.remove(TableProperties.WRITE_DATA_LOCATION);
Review comment:
When snapshotting a table that has folder storage location set, should
we also remove it in addition to write data location?
Also should we remove object storage location?
--
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]