You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2023/09/11 03:03:17 UTC

[GitHub] [arrow] mapleFU commented on a diff in pull request #37646: GH-37643: [C++] Enhance arrow::Datum::ToString

mapleFU commented on code in PR #37646:
URL: https://github.com/apache/arrow/pull/37646#discussion_r1320945953


##########
cpp/src/arrow/datum.cc:
##########
@@ -182,15 +182,15 @@ std::string Datum::ToString() const {
     case Datum::NONE:
       return "nullptr";
     case Datum::SCALAR:
-      return "Scalar";
+      return "Scalar(" + scalar()->ToString() + ")";
     case Datum::ARRAY:
-      return "Array";
+      return "Array(" + make_array()->ToString() + ")";

Review Comment:
   `make_array` will generate a temp `::arrow::Array` object, don't know if we have a better way for this



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org