osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (FLINK-10264) Exception is misleading when no default constructor define for events


Swapan Shaw created FLINK-10264:
-----------------------------------

             Summary: Exception is misleading when no default constructor define for events
                 Key: FLINK-10264
                 URL: https://issues.apache.org/jira/browse/FLINK-10264
             Project: Flink
          Issue Type: Bug
          Components: DataStream API
            Reporter: Swapan Shaw


When I have not declare the default constructor in the  RequestEvent then I got the below exception which is misleading.

 
{code:java}
DataStream<RequestEvent> inputStream = env.addSource(...)
tEnv.registerDataStream(...);
{code}
 

 
{code:java}
Exception in thread "main" org.apache.flink.table.api.TableException: Only the first field can reference an atomic type.
 at org.apache.flink.table.api.TableEnvironment$$anonfun$5.apply(TableEnvironment.scala:996)
 at org.apache.flink.table.api.TableEnvironment$$anonfun$5.apply(TableEnvironment.scala:991)
 at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
 at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
 at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
 at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
 at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
 at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186)
 at org.apache.flink.table.api.TableEnvironment.getFieldInfo(TableEnvironment.scala:991)
 at org.apache.flink.table.api.StreamTableEnvironment.registerDataStreamInternal(StreamTableEnvironment.scala:546)
 at org.apache.flink.table.api.java.StreamTableEnvironment.registerDataStream(StreamTableEnvironment.scala:133)}}{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)