pitrou commented on code in PR #44215:
URL: https://github.com/apache/arrow/pull/44215#discussion_r1773245873


##########
cpp/src/arrow/extension/json.h:
##########
@@ -45,12 +45,14 @@ class ARROW_EXPORT JsonExtensionType : public ExtensionType 
{
 
   std::shared_ptr<Array> MakeArray(std::shared_ptr<ArrayData> data) const 
override;
 
+  static Result<std::shared_ptr<DataType>> Make(const 
std::shared_ptr<DataType>& storage_type);
+
  private:
   std::shared_ptr<DataType> storage_type_;
 };
 
 /// \brief Return a JsonExtensionType instance.
 ARROW_EXPORT std::shared_ptr<DataType> json(
-    std::shared_ptr<DataType> storage_type = utf8());
+    const std::shared_ptr<DataType>& storage_type = utf8());

Review Comment:
   The original signature was slightly better, since it didn't imply a 
`std::shared_ptr` copy. Though it arguably doesn't matter much.



##########
cpp/src/parquet/arrow/arrow_schema_test.cc:
##########
@@ -763,7 +763,7 @@ TEST_F(TestConvertParquetSchema, 
ParquetSchemaArrowExtensions) {
     props.set_arrow_extensions_enabled(true);
     auto arrow_schema = ::arrow::schema(
         {::arrow::field("json_1", ::arrow::extension::json(), true),
-         ::arrow::field("json_2", 
::arrow::extension::json(::arrow::large_utf8()),
+         ::arrow::field("json_2", ::arrow::extension::json(::arrow::utf8()),

Review Comment:
   Instead of making the test easier, can you keep `large_utf8` and ensure it 
passes?



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