atharvalade opened a new issue, #3177:
URL: https://github.com/apache/iggy/issues/3177

   In `iceberg_sink/src/router/dynamic_router.rs`, the `extract_route_field` 
method used `val.to_string()` on a `simd_json::OwnedValue`:
   
   ```rust
   .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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to