Copilot commented on code in PR #55862:
URL: https://github.com/apache/arrow/pull/55862#discussion_r4740117594


##########
cpp/src/parquet/column_writer.cc:
##########
@@ -2517,6 +2522,17 @@ Status 
TypedColumnWriterImpl<ByteArrayType>::WriteArrowDense(
     ARROW_UNSUPPORTED();
   }
 
+  return WriteArrowBinary(def_levels, rep_levels, num_levels, array, ctx);
+}
+
+template <typename ParquetType>
+Status TypedColumnWriterImpl<ParquetType>::WriteArrowBinary(const int16_t* 
def_levels,
+                                                            const int16_t* 
rep_levels,
+                                                            int64_t num_levels,
+                                                            const 
::arrow::Array& array,
+                                                            ArrowWriteContext* 
ctx)
+  requires(::arrow::internal::IsOneOf<ParquetType, ByteArrayType, 
FLBAType>::value)
+{

Review Comment:
   Same issue as above: the out-of-class definition also uses a C++20 
`requires` clause, which can break compilation in C++17 builds. Use a 
C++17-compatible technique to constrain this template (and keep 
declaration/definition consistent) so the codebase doesn’t require upgrading 
the language standard for this change.



##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1549,6 +1549,11 @@ class TypedColumnWriterImpl : public ColumnWriterImpl,
                              int64_t num_levels, const ::arrow::Array& array,
                              ArrowWriteContext* ctx, bool maybe_parent_nulls);
 
+  Status WriteArrowBinary(const int16_t* def_levels, const int16_t* rep_levels,
+                          int64_t num_levels, const ::arrow::Array& array,
+                          ArrowWriteContext* ctx)
+    requires(::arrow::internal::IsOneOf<ParquetType, ByteArrayType, 
FLBAType>::value);

Review Comment:
   This introduces a C++20 `requires` clause. Apache Arrow C++ has historically 
targeted C++17, so this may fail to compile under the project’s configured C++ 
standard / CI toolchains. Prefer a C++17-compatible constraint (e.g., 
`std::enable_if_t` on the declaration/definition, tag dispatch, or 
specialization) to keep the build standard consistent.



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