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
Describe the bug
Jooq generated queries sometimes use cast when building Java resulting SQL with casts. Example case SQL join on bloomdb.filtertype.id = cast(bloomdb.uuid_table.filter_type_id as unsigned)
Better solution would be to type check in Java and not cast in SQL.
example of a cast in jooq that should be replaced (JOURNALDB.LOGFILE.ID.eq((Field<ULong>) table.field("partition_id"))
Expected behavior
No casts should be used
How to reproduce
Present in bloom filter queries for example when filter table is left joined to main query.
Software version
3.3.3
Additional context
Dynamic table field types are not know beforehand by jooq. Type must be assigned in Java, couple of solutions:
Construct a field with a type by yourself DSL.field("id", ULong.class);
Construt a typed field from current table table.field("id", ULong.class);
This should move type checking to java but include tests that casts are not present in SQL.
The text was updated successfully, but these errors were encountered:
Describe the bug
Jooq generated queries sometimes use cast when building Java resulting SQL with casts. Example case SQL
join on bloomdb.filtertype.id = cast(bloomdb.uuid_table.filter_type_id as unsigned)
Better solution would be to type check in Java and not cast in SQL.
example of a cast in jooq that should be replaced
(JOURNALDB.LOGFILE.ID.eq((Field<ULong>) table.field("partition_id"))
Expected behavior
No casts should be used
How to reproduce
Present in bloom filter queries for example when filter table is left joined to main query.
Software version
3.3.3
Additional context
Dynamic table field types are not know beforehand by jooq. Type must be assigned in Java, couple of solutions:
DSL.field("id", ULong.class);
table.field("id", ULong.class);
This should move type checking to java but include tests that casts are not present in SQL.
The text was updated successfully, but these errors were encountered: