-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] Add Compute Kernel for Casting from String to Dictionary #39049
Comments
Progress UpdateWhat is the casting from String to Dictionary?arrow/cpp/src/arrow/scalar_test.cc Lines 1468 to 1498 in f7947cc
When printing casted value (
Legacy
|
Status Visit(const DictionaryType& dict_type) { | |
auto& out = checked_cast<DictionaryScalar*>(out_)->value; | |
ARROW_ASSIGN_OR_RAISE(auto cast_value, from_.CastTo(dict_type.value_type())); | |
ARROW_ASSIGN_OR_RAISE(out.dictionary, MakeArrayFromScalar(*cast_value, 1)); | |
return Int32Scalar(0).CastTo(dict_type.index_type()).Value(&out.index); | |
} |
kou
pushed a commit
that referenced
this issue
Jan 6, 2024
…in test (#39362) ### Rationale for this change Remove legacy code ### What changes are included in this PR? Replace the legacy scalar CastTo implementation for Dictionary Scalar in test. ### Are these changes tested? Yes. It is passed by existing test cases. ### Are there any user-facing changes? No. * Closes: #39049 Authored-by: Hyunseok Seo <hsseo0501@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
clayburn
pushed a commit
to clayburn/arrow
that referenced
this issue
Jan 23, 2024
…calar in test (apache#39362) ### Rationale for this change Remove legacy code ### What changes are included in this PR? Replace the legacy scalar CastTo implementation for Dictionary Scalar in test. ### Are these changes tested? Yes. It is passed by existing test cases. ### Are there any user-facing changes? No. * Closes: apache#39049 Authored-by: Hyunseok Seo <hsseo0501@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…calar in test (apache#39362) ### Rationale for this change Remove legacy code ### What changes are included in this PR? Replace the legacy scalar CastTo implementation for Dictionary Scalar in test. ### Are these changes tested? Yes. It is passed by existing test cases. ### Are there any user-facing changes? No. * Closes: apache#39049 Authored-by: Hyunseok Seo <hsseo0501@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
zanmato1984
pushed a commit
to zanmato1984/arrow
that referenced
this issue
Feb 28, 2024
…calar in test (apache#39362) ### Rationale for this change Remove legacy code ### What changes are included in this PR? Replace the legacy scalar CastTo implementation for Dictionary Scalar in test. ### Are these changes tested? Yes. It is passed by existing test cases. ### Are there any user-facing changes? No. * Closes: apache#39049 Authored-by: Hyunseok Seo <hsseo0501@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the enhancement requested
This is a sub-issue of the issue mentioned below.
As we can see in the parent issue, we can find tables organizing the related functions.
ASSERT_OK_AND_ASSIGN(auto dict_hello, MakeScalar("hello")->CastTo(DictStr("")->type()));
ASSERT_OK_AND_ASSIGN(auto dict_hello, MakeScalar("hello")->CastTo(dict_type));
ASSERT_OK_AND_ASSIGN(auto cast_alpha, alpha->CastTo(ty));
We need to implement casting from
String
toDictionary
.partition_test.cc
Snippet to reproduce
scalar_test.cc
Snippet to reproduce
Component(s)
C++
The text was updated successfully, but these errors were encountered: