askalt commented on issue #19809:
URL: https://github.com/apache/datafusion/issues/19809#issuecomment-3749653107
It seems, `binary_as_string` configuration fixes:
```sql
set datafusion.execution.parquet.binary_as_string = true
```
Because `SplitPartFunc` explicitly wants string:
```rust
impl SplitPartFunc {
pub fn new() -> Self {
Self {
signature: Signature::coercible(
vec![
Coercion::new_exact(TypeSignatureClass::Native(logical_string())),
Coercion::new_exact(TypeSignatureClass::Native(logical_string())),
Coercion::new_implicit(
TypeSignatureClass::Native(logical_int64()),
vec![TypeSignatureClass::Integer],
NativeType::Int64,
),
],
Volatility::Immutable,
),
}
}
}
```
The question is: "why did it even work at one time without this setting?".
Investigated that it worked before refactoring
https://github.com/apache/datafusion/commit/1ce4b51a4827604b1c9abad8dab2c65c2d4e933e
There was cast to utf-8 in the plan:
```
split_part(CAST(hits.URL AS Utf8), CAST(Utf8("resolution=") AS Utf8View),
Int64(2))
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]