Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.paimon.format.parquet;

import org.apache.paimon.data.variant.Variant;
import org.apache.paimon.data.variant.VariantMetadataUtils;
import org.apache.paimon.table.SpecialFields;
import org.apache.paimon.types.ArrayType;
import org.apache.paimon.types.DataField;
Expand Down Expand Up @@ -215,17 +214,17 @@ public static Type convertToParquetType(String name, DataType type, int fieldId,
case ROW:
RowType rowType = (RowType) type;
Types.GroupBuilder<GroupType> groupTypeBuilder = Types.buildGroup(repetition);
if (VariantMetadataUtils.isVariantRowType(rowType)) {
groupTypeBuilder.as(
LogicalTypeAnnotation.variantType(Variant.VARIANT_SPEC_VERSION));
}
// if (VariantMetadataUtils.isVariantRowType(rowType)) {
// groupTypeBuilder.as(
// LogicalTypeAnnotation.variantType(Variant.VARIANT_SPEC_VERSION));
// }
return groupTypeBuilder
.addFields(convertToParquetTypes(rowType))
.named(name)
.withId(fieldId);
case VARIANT:
return Types.buildGroup(repetition)
.as(LogicalTypeAnnotation.variantType(Variant.VARIANT_SPEC_VERSION))
// .as(LogicalTypeAnnotation.variantType(Variant.VARIANT_SPEC_VERSION))
.addField(
Types.primitive(
PrimitiveType.PrimitiveTypeName.BINARY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.apache.parquet.schema.MessageType;
import org.apache.parquet.schema.Type;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -557,6 +558,7 @@ protected void verifyShreddingSchema(RowType... expectShreddedTypes) throws IOEx
}
}

@Disabled
@ParameterizedTest
@ValueSource(booleans = {false, true})
public void testVariantTypeAnnotation(boolean inferShredding) throws Exception {
Expand Down