lsyldliu commented on code in PR #20442:
URL: https://github.com/apache/flink/pull/20442#discussion_r939516535


##########
flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/reader/ParquetDataColumnReaderFactory.java:
##########
@@ -0,0 +1,281 @@
+/*
+ * 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.flink.formats.parquet.vector.reader;
+
+import org.apache.flink.table.data.TimestampData;
+
+import org.apache.parquet.bytes.ByteBufferInputStream;
+import org.apache.parquet.column.Dictionary;
+import org.apache.parquet.column.values.ValuesReader;
+import org.apache.parquet.io.api.Binary;
+import org.apache.parquet.schema.PrimitiveType;
+
+import javax.annotation.Nullable;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
+/**
+ * Parquet file has self-describing schema which may differ from the user 
required schema (e.g.
+ * schema evolution). This factory is used to retrieve user required typed 
data via corresponding
+ * reader which reads the underlying data.
+ */
+public final class ParquetDataColumnReaderFactory {
+
+    private ParquetDataColumnReaderFactory() {}
+
+    /** default reader for {@link ParquetDataColumnReader}. */
+    public static class DefaultParquetDataColumnReader implements 
ParquetDataColumnReader {

Review Comment:
   I think your advice is very good, although split it into two class maybe 
seem to more clear, but after read hive related code, I think we can refer to 
hive. I have remove the @Nullable annotation.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to