wattache commented on code in PR #29715:
URL: https://github.com/apache/beam/pull/29715#discussion_r1489201711


##########
sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/TableSchema.java:
##########
@@ -111,6 +112,14 @@ public static Schema.FieldType 
getEquivalentFieldType(ColumnType columnType) {
         return Schema.FieldType.STRING;
       case BOOL:
         return Schema.FieldType.BOOLEAN;
+      case TUPLE:
+        List<Schema.Field> fields =
+            columnType.tupleTypes().entrySet().stream()
+                .map(x -> Schema.Field.of(x.getKey(), 
Schema.FieldType.DATETIME))

Review Comment:
   Hi, 
   
   Also, it seems that `Array(Tuple(*))` is not supported when calling 
`ClickHouseIO.getTableSchema`. 
   
   This seems to fix the issue : 
   `
   if (type.toLowerCase().trim().startsWith("tuple(")) {
        String content = tuplePreprocessing(type);
        columnType = TableSchema.ColumnType.parse(content);
   }
   else if (type.toLowerCase().trim().startsWith("array(tuple(")) {
        String content = tuplePreprocessing(type);
        columnType = TableSchema.ColumnType.parse(content);
   }
   `



-- 
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]

Reply via email to