flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink issue #6082: [FLINK-9444][table] KafkaAvroTableSource failed to work f...
Date Wed, 06 Jun 2018 23:22:15 GMT
Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/6082
  
    I think we have to return an typed array here. A `List` won't be supported by the built-in
SQL functions. 
    
    There are a few tricks on can play to create typed arrays, even in static code like
    
    ```
    Object[] array = (Object[]) Array.newInstance(clazz, length);
    ```
    
    Have a look at the code of the ORC InputFormat that had to solve a similar challenge:
[OrcBatchReader.java](https://github.com/apache/flink/blob/master/flink-connectors/flink-orc/src/main/java/org/apache/flink/orc/OrcBatchReader.java).


---

Mime
View raw message