大家好!
伙伴们,附件有实现 blink 中 flink-table 模块 UpsertStreamTableSink, BatchTableSink
接口代码 ,自实现类放在 flink-jdbc 模块 org.apache.flink.api.java.io.jdbc 包下。大神们帮忙看看呗!
江湖救急啊!
目前实现后,在代码中调用,报异常:
Exception in thread "main" org.apache.flink.table.api.TableException: Arity [4]
of result [[Lorg.apache.flink.api.common.typeinfo.TypeInformation;@377dfb8d]
does not match the number[2] of requested type [Java Tuple2<Boolean, Row(ido:
String, nameo: String, moneyo: String, timeo: String)>].
主要盲点:
1、要怎么匹配上这个类型 Tuple2<Boolean, Row> ?这里面决定 update 或 delete 的 Boolean型值
怎么赋? Row 映射进去的底层原理?
2、这两个改怎么重写?另外 keys 和 isAppendOnly 调用时该怎么赋值?
@Override
public void setKeyFields(String[] keys) {}
@Override
public void setIsAppendOnly(Boolean isAppendOnly){}
[email protected]