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 2020/08/27 00:07:55 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #1382: Extract FixupTypes to Iceberg from Spark

rdblue commented on a change in pull request #1382:
URL: https://github.com/apache/iceberg/pull/1382#discussion_r477732671



##########
File path: api/src/main/java/org/apache/iceberg/types/FixupTypes.java
##########
@@ -17,32 +17,23 @@
  * under the License.
  */
 
-package org.apache.iceberg.spark;
+package org.apache.iceberg.types;
 
 import java.util.List;
 import java.util.function.Supplier;
 import org.apache.iceberg.Schema;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
 import org.apache.iceberg.relocated.com.google.common.collect.Lists;
-import org.apache.iceberg.types.Type;
-import org.apache.iceberg.types.TypeUtil;
-import org.apache.iceberg.types.Types;
 
 /**
- * This is used to fix primitive types to match a table schema. Some types, like binary and fixed,
- * are converted to the same Spark type. Conversion back can produce only one, which may not be
- * correct. This uses a reference schema to override types that were lost in round-trip conversion.
+ * This is used to fix primitive types to match a table schema. This uses a reference schema to
+ * override types that were lost in round-trip conversion.
  */
-class FixupTypes extends TypeUtil.CustomOrderSchemaVisitor<Type> {
+public abstract class FixupTypes extends TypeUtil.CustomOrderSchemaVisitor<Type> {

Review comment:
       Sorry this class is so complicated. It's really just a Schema with partner visitor, but that pattern wasn't around when we needed to write this, so I used the custom order visitor. I should eventually go clean these up!




----------------------------------------------------------------
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.

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