karuppayya commented on a change in pull request #3435:
URL: https://github.com/apache/iceberg/pull/3435#discussion_r740490860
##########
File path: data/src/main/java/org/apache/iceberg/data/TableMigrationUtil.java
##########
@@ -129,6 +140,9 @@ private TableMigrationUtil() {
try {
ParquetMetadata metadata = ParquetFileReader.readFooter(conf,
stat);
metrics = ParquetUtil.footerMetrics(metadata, Stream.empty(),
metricsSpec, mapping);
+ if
(!canImportSchema(ParquetSchemaUtil.convert(metadata.getFileMetaData().getSchema()),
schema)) {
+ throw new ValidationException("Mismatch in table and imported
file schema");
Review comment:
Also, each of the format specific listing dont have to throw the
exception. Have added it
--
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]