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

   The default branch in `extract_column_value_static` attempts to read any 
unrecognized Postgres type as `Option<String>`:
   
   ```rust
   _ => {
       let value: Option<String> = row
           .try_get(column_index)
           .map_err(|_| Error::InvalidRecord)?;
       Ok(value
           .map(serde_json::Value::String)
           .unwrap_or(serde_json::Value::Null))
   }
   ```
   
   If the type cannot be deserialized as String (arrays, composite types, 
ranges, etc.), it returns `Error::InvalidRecord` with no indication of which 
column or type caused the failure. There are many common Postgres types not 
covered: arrays (`_INT4`, `_TEXT`), enums, `INTERVAL`, `INET`,`CIDR`, 
`MACADDR`, `TSVECTOR`, `POINT`, `JSONPATH`, etc.
   
   **Fix**: Log the type name and column name before falling through to the 
default. Consider using `row.try_get_raw()` and converting to a text 
representation as a more robust fallback. At minimum: `warn!("Unknown column 
type '{}' for column '{}', attempting String fallback", type_name, 
column.name());`


-- 
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