fengguangyuan commented on issue #3299:
URL: https://github.com/apache/iceberg/issues/3299#issuecomment-945696196
From the test files `TestRewriteFiles.java` and `TestCreateActions.java`,
you could figure out the following sample code:
```java
TestTables.TestTable table = TestTables.create(tableDir, "test", schema,
spec, formatVersion);
// or you do not need create a new HiveCatalog, instead using the internal
// TableCatalog catalog = (TableCatalog)
spark.sessionState().catalogManager().catalog("spark_catalog");
// SparkTable table = catalog.loadTable("SUBSCRIBER");
table.newRewrite()
.rewriteFiles(ImmutableSet.of(FILE_A), ImmutableSet.of(),
ImmutableSet.of(), ImmutableSet.of(FILE_A_DELETES))
.apply()
```
I think you lose the `apply()` action here.
Or you may code simply:
```java
spark.read().parquet("/path.parquet").writeTo("SUBSCRIBER");
```
--
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]