nirandaperera commented on pull request #10721:
URL: https://github.com/apache/arrow/pull/10721#issuecomment-880824036
> ```
> Expected 'ReplaceFieldsWithKnownValues( KnownFieldValues{{{"dict_str",
dict_i32}}}, expr)' to fail with NotImplemented, but got OK
> ```
>
> Looks like this enables something that didn't work before?
>
> ```
> ASSERT_OK_AND_ASSIGN(auto expr,
field_ref("dict_str").Bind(*kBoringSchema));
> Datum dict_i32{
> DictionaryScalar::Make(MakeScalar<int32_t>(0),
ArrayFromJSON(int32(), R"([3])"))};
> // Unsupported cast dictionary(int32(), int32()) -> dictionary(int32(),
utf8())
> ASSERT_RAISES(NotImplemented, ReplaceFieldsWithKnownValues(
> KnownFieldValues{{{"dict_str",
dict_i32}}}, expr));
> // Unsupported cast dictionary(int8(), utf8()) -> dictionary(int32(),
utf8())
> dict_str = Datum{
> DictionaryScalar::Make(MakeScalar<int8_t>(0), ArrayFromJSON(utf8(),
R"(["a"])"))};
> ASSERT_RAISES(NotImplemented, ReplaceFieldsWithKnownValues(
> KnownFieldValues{{{"dict_str",
dict_str}}}, expr));
> ```
Ah! indeed! thanks...
--
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]