felipecrv commented on code in PR #36310:
URL: https://github.com/apache/arrow/pull/36310#discussion_r1243884320


##########
cpp/src/arrow/scalar.cc:
##########
@@ -1127,6 +1127,28 @@ Status CastImpl(const StructScalar& from, StringScalar* 
to) {
   return Status::OK();
 }
 
+// casts between variable-length and fixed-length list types
+template <typename ToScalar>
+enable_if_t<is_list_like_type<typename ToScalar::TypeClass>::value &&
+                ToScalar::TypeClass::type_id != Type::MAP,
+            Status>
+CastImpl(const BaseListScalar& from, ToScalar* to) {
+  DCHECK(from.type->id() == Type::LIST || from.type->id() == Type::LARGE_LIST 
||
+         from.type->id() == Type::FIXED_SIZE_LIST);

Review Comment:
   I will use `is_var_length_list` in the enable-if and expand the test cases.



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