You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing schema/type validation between SQL and Java operators leads to runtime ClassCastException #747
While working on a pipeline like PostgresTableSource → Join → SqlToStream → Java map → collect, I faced a runtime ClassCastException. The issue is happening because after the SQL join, the data is actually in a tuple-like structure (like Tuple2<Record, Record>), but during the SqlToStream conversion, this structure is not preserved properly and everything is treated as a Record.
Because of this, when I try to use the data in the Java map step (for example accessing fields or casting types), it assumes a wrong structure and crashes at runtime (e.g., String cannot be cast to Integer). There is no validation or check between SQL and Java stages, so the mismatch is not caught early and only fails during execution.
Ideally, the correct schema/type should be preserved (or validated) when moving from SQL to Java, so that such issues don’t happen at runtime.
for example -
CREATE TABLE table_a (
id INT,
name TEXT
);
CREATE TABLE table_b (
id TEXT, -- different type
value TEXT
);
@novatechflow I want to work on this issue. I will fix the schema/type validation between both the operators to ensure safe migrations. Are you working on this? @makarandhinge
Activity
AliRana30 commentedon Sep 2, 2026
@novatechflow I want to work on this issue. I will fix the schema/type validation between both the operators to ensure safe migrations. Are you working on this? @makarandhinge