Skip to content

Commit

Permalink
Nested fields in PartitionSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
rdsr committed Jun 14, 2019
1 parent 177b63a commit 95b95b0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions core/src/test/java/org/apache/iceberg/TestPartitionData.java
@@ -0,0 +1,18 @@
package org.apache.iceberg;

import org.junit.Test;

import static org.apache.iceberg.types.Types.*;

public class TestPartitionData {
private static final Schema SCHEMA = new Schema(
NestedField.required(1, "a_struct", StructType.of(
NestedField.required(2, "a_primitive", LongType.get())))
);

@Test
public void testNestedField() {
PartitionSpec spec = PartitionSpec.builderFor(SCHEMA).identity("a_struct.a_primitive").build();
new PartitionData(spec.partitionType());
}
}

0 comments on commit 95b95b0

Please sign in to comment.