HF RL Explorer

Bug: CAST on key columns loses upsert/unique key information even when the cast is injective

Bug: CAST on key columns loses upsert/unique key information even when the cast is injective: a task in LegoFlow-SWE (Harbor dataset). When a SELECT projection applies a CAST to a column that is part of a primary key or upsert key, the query planner incorrectly drops the key metadata from the…

The task

When a SELECT projection applies a CAST to a column that is part of a primary key or upsert key, the query planner incorrectly drops the key metadata from the output. This happens even when the CAST is injective — that is, it **does** not lose information and would preserve uniqueness. As a result, downstream…

Part of Lego-X/LegoFlow-SWE.