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 2019/09/06 16:17:38 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #456: Fix avro data test schema according to spec

rdblue commented on a change in pull request #456: Fix avro data test schema according to spec
URL: https://github.com/apache/incubator-iceberg/pull/456#discussion_r321810304
 
 

 ##########
 File path: spark/src/test/java/org/apache/iceberg/spark/data/AvroDataTest.java
 ##########
 @@ -37,24 +37,28 @@
 
   protected abstract void writeAndValidate(Schema schema) throws IOException;
 
-  protected static final StructType SUPPORTED_PRIMITIVES = StructType.of(
-      required(100, "id", LongType.get()),
-      optional(101, "data", Types.StringType.get()),
-      required(102, "b", Types.BooleanType.get()),
-      optional(103, "i", Types.IntegerType.get()),
-      required(104, "l", LongType.get()),
-      optional(105, "f", Types.FloatType.get()),
-      required(106, "d", Types.DoubleType.get()),
-      optional(107, "date", Types.DateType.get()),
-      required(108, "ts", Types.TimestampType.withZone()),
-      required(110, "s", Types.StringType.get()),
-      //required(111, "uuid", Types.UUIDType.get()),
-      required(112, "fixed", Types.FixedType.ofLength(7)),
-      optional(113, "bytes", Types.BinaryType.get()),
-      required(114, "dec_9_0", Types.DecimalType.of(9, 0)),
-      required(115, "dec_11_2", Types.DecimalType.of(11, 2)),
-      required(116, "dec_38_10", Types.DecimalType.of(38, 10)) // spark's maximum precision
-  );
+  protected static final StructType SUPPORTED_PRIMITIVES = supportedPrimitives(0);
 
 Review comment:
   Would it work to use `TypeUtil.assignFreshIds` instead? I think that would be simpler.

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


With regards,
Apache Git Services

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