You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "EricJoy2048 (via GitHub)" <gi...@apache.org> on 2023/05/10 07:38:25 UTC

[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #4457: [Bug][Connector][FileBase]Parquet reader parsing array type exception.

EricJoy2048 commented on code in PR #4457:
URL: https://github.com/apache/incubator-seatunnel/pull/4457#discussion_r1189480017


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/writer/ParquetReadStrategyTest.java:
##########
@@ -121,6 +121,22 @@ public void testParquetReadProjection2() throws Exception {
         parquetReadStrategy.read(path, testCollector);
     }
 
+    @Test
+    public void testParquetReadArray() throws Exception {
+        URL resource = ParquetReadStrategyTest.class.getResource("/array.parquet");
+        Assertions.assertNotNull(resource);
+        String path = Paths.get(resource.toURI()).toString();
+        ParquetReadStrategy parquetReadStrategy = new ParquetReadStrategy();
+        LocalConf localConf = new LocalConf(FS_DEFAULT_NAME_DEFAULT);
+        parquetReadStrategy.init(localConf);
+        SeaTunnelRowType seaTunnelRowTypeInfo =
+                parquetReadStrategy.getSeaTunnelRowTypeInfo(localConf, path);
+        Assertions.assertNotNull(seaTunnelRowTypeInfo);
+        System.out.println(seaTunnelRowTypeInfo);

Review Comment:
   Why not use assert?



-- 
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: commits-unsubscribe@seatunnel.apache.org

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