In iceberg_sink/src/router/dynamic_router.rs, the extract_route_field method used val.to_string() on a simd_json::OwnedValue:
.map(|val| val.to_string())
For a string value like tpch.lineitem, to_string() produces the JSON representation "tpch.lineitem" (with literal quote characters). This means the route field value passed to is_valid_namespaced_table and used as a table lookup key contains surrounding quotes, so it either fails validation or looks up a nonexistent table name.
This means dynamic routing with string-valued route fields has never worked correctly, or has never been tested with a real Iceberg catalog end-to-end.
Fix : Use val.as_str().map(|s| s.to_string()) instead of val.to_string().
This should be covered by an integration test that writes a message with a string route field and verifies it lands in the correct Iceberg table.
In
iceberg_sink/src/router/dynamic_router.rs, theextract_route_fieldmethod usedval.to_string()on asimd_json::OwnedValue:For a string value like
tpch.lineitem,to_string()produces the JSON representation"tpch.lineitem"(with literal quote characters). This means the route field value passed tois_valid_namespaced_tableand used as a table lookup key contains surrounding quotes, so it either fails validation or looks up a nonexistent table name.This means dynamic routing with string-valued route fields has never worked correctly, or has never been tested with a real Iceberg catalog end-to-end.
Fix : Use
val.as_str().map(|s| s.to_string())instead ofval.to_string().This should be covered by an integration test that writes a message with a string route field and verifies it lands in the correct Iceberg table.