brkyvz commented on code in PR #3608: URL: https://github.com/apache/parquet-java/pull/3608#discussion_r4416247228
########## parquet-column/src/main/java/org/apache/parquet/io/api/FileConverters.java: ########## @@ -0,0 +1,146 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.parquet.io.api; + +import java.util.Objects; +import java.util.function.Consumer; +import org.apache.parquet.schema.GroupType; +import org.apache.parquet.schema.LogicalTypeAnnotation; +import org.apache.parquet.schema.Type; + +/** Converters for assembling values represented by a Parquet {@code FILE}-annotated group. */ +public final class FileConverters { + private FileConverters() {} + + /** + * Creates a converter for a possibly projected FILE group. + * + * <p>FILE values are atomic and cannot be projected by child field. The projected schema may + * contain fields absent from this particular file for schema-evolution purposes, but it must + * contain every FILE field stored in the file schema. The consumer receives {@code null} when an + * invalid FILE reference is encountered, as permitted by the FILE logical-type specification. + * + * @param schema schema presented to the converter + * @param fileSchema FILE group stored in the file + * @param consumer consumer for converted values + * @return a converter for the complete FILE value + * @throws IllegalArgumentException if the projected schema omits a stored FILE field + */ + public static GroupConverter newFileConverter( Review Comment: we do allow for field-ids to be set for these fields. that's not against the spec -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
