wangwei1025 commented on a change in pull request #15939:
URL: https://github.com/apache/flink/pull/15939#discussion_r640355678



##########
File path: 
flink-formats/flink-orc/src/main/java/org/apache/flink/orc/vector/OrcRowColumnVector.java
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.orc.vector;
+
+import org.apache.flink.table.data.ColumnarRowData;
+import org.apache.flink.table.data.vector.ColumnVector;
+import org.apache.flink.table.data.vector.VectorizedColumnBatch;
+import org.apache.flink.table.types.logical.RowType;
+
+import org.apache.hadoop.hive.ql.exec.vector.StructColumnVector;
+
+/** This column vector is used to adapt hive's StructColumnVector to Flink's 
RowColumnVector. */
+public class OrcRowColumnVector extends AbstractOrcColumnVector
+        implements org.apache.flink.table.data.vector.RowColumnVector {
+
+    private StructColumnVector hiveVector;
+    private RowType type;
+    private VectorizedColumnBatch vectorizedColumnBatch;

Review comment:
       append final

##########
File path: 
flink-formats/flink-orc/src/test/java/org/apache/flink/orc/OrcFileSystemITCase.java
##########
@@ -164,4 +167,40 @@ public void testOrcFilterPushDown() throws 
ExecutionException, InterruptedExcept
                 "select x, y from orcFilterTable where g = timestamp 
'2020-01-01 05:20:00' and x = 'x10'",
                 Collections.singletonList(Row.of("x10", "10")));
     }
+
+    @Test
+    public void testNestedTypes() throws ExecutionException, 
InterruptedException {
+        String path =
+                
this.getClass().getClassLoader().getResource("test-data-nested.orc").getPath();
+        super.tableEnv()
+                .executeSql(
+                        String.format(
+                                "create table orcNestedTypesTable ("
+                                        + "boolean1 boolean,"
+                                        + "byte1 tinyint,"
+                                        + "short1 smallint,"
+                                        + "int1 int,"
+                                        + "long1 bigint,"
+                                        + "float1 float,"
+                                        + "double1 double,"
+                                        + "string1 string,"
+                                        + "middle ROW<list ARRAY<ROW<int1 
int,string1 string>>>,"
+                                        + "list ARRAY<ROW<int1 int,string1 
string>>,"
+                                        + "map MAP<string,ROW<int1 int,string1 
string>>"
+                                        + ") with ("
+                                        + "'connector' = 'filesystem',"
+                                        + "'format' = 'orc',"
+                                        + "'path' = '%s')",
+                                path));
+
+        TableResult tableResult = super.tableEnv().executeSql("SELECT * FROM 
orcNestedTypesTable");
+        List<Row> rows = new ArrayList<>();
+        tableResult.collect().forEachRemaining(rows::add);

Review comment:
       fixed




-- 
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:
[email protected]


Reply via email to