Flink中因java的泛型擦除导致的报错及解决

【报错】

java 复制代码
Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'Custom Source' could not be determined automatically, due to type erasure. You can give type information hints by using the returns(...) method on the result of the transformation call, or by letting your function implement the 'ResultTypeQueryable' interface.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
SmartBoyW36 分钟前
深入ECMAScript规范:彻底搞懂JS隐式类型转换与底层ToPrimitive机制
前端·javascript
用户852495071841 小时前
解密 JavaScript 中的 this:谁才是真正的调用者?
javascript·面试
Heo1 小时前
Vite进阶用法详解
前端·javascript·面试
铁皮饭盒3 小时前
Next.js 风格路由内置?Bun FileSystemRouter 凭啥这么香
javascript
小林ixn4 小时前
别再背八股了!从 5 个真实场景彻底搞懂 JavaScript 的 this
javascript
东风破_4 小时前
JavaScript 面试常考的字符串算法:从反转字符串到回文判断
前端·javascript
巴勒个啦4 小时前
D3.js 入门实战:用力导向图可视化项目依赖关系
javascript
不好听6135 小时前
JavaScript 的 this 到底指向谁?
javascript·面试
触底反弹5 小时前
🔥 2026 年爆火的 Harness Engineering 到底是什么?从原理到实战一文讲透
javascript·人工智能·程序员
mONESY5 小时前
一文搞定JavaScript不同场景中 this 的指向问题
javascript