szehon-ho commented on a change in pull request #3273:
URL: https://github.com/apache/iceberg/pull/3273#discussion_r732366659
##########
File path: data/src/main/java/org/apache/iceberg/data/TableMigrationUtil.java
##########
@@ -91,7 +93,12 @@ private TableMigrationUtil() {
return Arrays.stream(fs.listStatus(partition, HIDDEN_PATH_FILTER))
.filter(FileStatus::isFile)
.map(stat -> {
- Metrics metrics = new Metrics(-1L, null, null, null);
+ InputFile inFile =
HadoopInputFile.fromLocation(stat.getPath().toString(), conf);
+ long length = inFile.getLength();
+
+ // Seeking to the end will count all the rows.
+ long rowCount = AvroIO.findStartingRowPos(inFile::newStream,
length);
Review comment:
Done, thanks for the suggestion
--
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]