progger-dev commented on code in PR #13901:
URL: https://github.com/apache/arrow/pull/13901#discussion_r1567701968
##########
cpp/src/arrow/extension/CMakeLists.txt:
##########
@@ -15,10 +15,19 @@
# specific language governing permissions and limitations
# under the License.
-add_arrow_test(test
- SOURCES
- fixed_shape_tensor_test.cc
- PREFIX
- "arrow-fixed-shape-tensor")
+if(ARROW_JSON)
+ add_arrow_test(test
+ SOURCES
+ fixed_shape_tensor_test.cc
+ json_test.cc
+ PREFIX
+ "arrow-canonical-extensions")
+else()
+ add_arrow_test(test
+ SOURCES
+ json_test.cc
Review Comment:
Should this `fixed_shape_tensor_test.cc`?
##########
cpp/src/arrow/extension_type.cc:
##########
@@ -144,13 +145,16 @@ namespace internal {
static void CreateGlobalRegistry() {
g_registry = std::make_shared<ExtensionTypeRegistryImpl>();
+ std::vector<std::shared_ptr<DataType>> ext_types{::arrow::extension::json()};
#ifdef ARROW_JSON
- // Register canonical extension types
- auto ext_type =
-
checked_pointer_cast<ExtensionType>(extension::fixed_shape_tensor(int64(), {}));
-
- ARROW_CHECK_OK(g_registry->RegisterType(ext_type));
+ ext_types.push_back(extension::fixed_shape_tensor(int64(), {}));
Review Comment:
Is the placement of `json()` and `fixed_shape_tensor()` correct?
##########
cpp/src/arrow/extension_type_test.cc:
##########
@@ -26,6 +26,7 @@
#include "arrow/array/array_nested.h"
#include "arrow/array/util.h"
+#include "arrow/extension/json.h"
Review Comment:
unused import?
--
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]