You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/02 08:57:51 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #4577: Fixes read metadata table failed due to illegal character

nastra commented on code in PR #4577:
URL: https://github.com/apache/iceberg/pull/4577#discussion_r1011379701


##########
core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java:
##########
@@ -107,13 +107,15 @@ public Schema record(Schema record, List<String> names, Iterable<Schema.Field> s
             field.name());
         // Create a field that will be defaulted to null. We assign a unique suffix to the field
         // to make sure that even if records in the file have the field it is not projected.
+        String fieldName = AvroSchemaUtil.makeCompatibleName(field.name());

Review Comment:
   this is already being done in L98, can we maybe do `String avroFieldName = AvroSchemaUtil.makeCompatibleName(field.name());` in L97 and use `avroFieldName` in L113? 



##########
core/src/test/java/org/apache/iceberg/TestMetadataTableScans.java:
##########
@@ -978,6 +1091,32 @@ private Set<String> expectedManifestListPaths(Iterable<Snapshot> snapshots, Long
         .collect(Collectors.toSet());
   }
 
+  private void createTableAndAddPartitionOnNestedFiled() throws IOException {

Review Comment:
   `TestMetadataTablesWithPartitionEvolution` seems to be a Spark test. I would actually prefer to have the tests in `iceberg-core` (maybe in a subclass of `TestReadProjection`?)



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org