andishgar commented on code in PR #47586:
URL: https://github.com/apache/arrow/pull/47586#discussion_r2426531811
##########
cpp/src/arrow/tensor/csx_converter.cc:
##########
@@ -24,40 +24,47 @@
#include "arrow/buffer.h"
#include "arrow/status.h"
+#include "arrow/tensor.h"
#include "arrow/type.h"
#include "arrow/util/checked_cast.h"
-#include "arrow/visit_type_inline.h"
+#include "arrow/util/logging_internal.h"
+#include "arrow/util/sparse_tensor_util.h"
namespace arrow {
class MemoryPool;
namespace internal {
+
namespace {
// ----------------------------------------------------------------------
// SparseTensorConverter for SparseCSRIndex
-class SparseCSXMatrixConverter : private SparseTensorConverterMixin {
- using SparseTensorConverterMixin::AssignIndex;
- using SparseTensorConverterMixin::IsNonZero;
-
+class SparseCSXMatrixConverter {
public:
SparseCSXMatrixConverter(SparseMatrixCompressedAxis axis, const Tensor&
tensor,
const std::shared_ptr<DataType>& index_value_type,
MemoryPool* pool)
: axis_(axis), tensor_(tensor), index_value_type_(index_value_type),
pool_(pool) {}
- Status Convert() {
+ // Note: The same type is considered for both indices and indptr during
+ // tensor-to-CSX-tensor conversion.
Review Comment:
There is no problem using the same type for the index pointer and the index.
--
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]