You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2022/12/07 09:22:04 UTC

[arrow] branch master updated: ARROW-18402: [C++] Expose `DeclarationInfo` (#14765)

This is an automated email from the ASF dual-hosted git repository.

westonpace pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new ce738320c5 ARROW-18402: [C++] Expose `DeclarationInfo` (#14765)
ce738320c5 is described below

commit ce738320c5ed727db64575c593796b9af4fdff49
Author: rtpsw <rt...@hotmail.com>
AuthorDate: Wed Dec 7 11:21:52 2022 +0200

    ARROW-18402: [C++] Expose `DeclarationInfo` (#14765)
    
    See https://issues.apache.org/jira/browse/ARROW-18402
    
    Authored-by: Yaron Gvili <rt...@hotmail.com>
    Signed-off-by: Weston Pace <we...@gmail.com>
---
 cpp/src/arrow/engine/api.h                         |  1 +
 .../arrow/engine/{api.h => substrait/relation.h}   | 23 +++++++++++++++++-----
 cpp/src/arrow/engine/substrait/relation_internal.h |  9 +--------
 3 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/cpp/src/arrow/engine/api.h b/cpp/src/arrow/engine/api.h
index 40cade9621..a3f10553ff 100644
--- a/cpp/src/arrow/engine/api.h
+++ b/cpp/src/arrow/engine/api.h
@@ -21,4 +21,5 @@
 
 #include "arrow/engine/substrait/extension_set.h"
 #include "arrow/engine/substrait/extension_types.h"
+#include "arrow/engine/substrait/relation.h"
 #include "arrow/engine/substrait/serde.h"
diff --git a/cpp/src/arrow/engine/api.h b/cpp/src/arrow/engine/substrait/relation.h
similarity index 66%
copy from cpp/src/arrow/engine/api.h
copy to cpp/src/arrow/engine/substrait/relation.h
index 40cade9621..c2103a0b9e 100644
--- a/cpp/src/arrow/engine/api.h
+++ b/cpp/src/arrow/engine/substrait/relation.h
@@ -15,10 +15,23 @@
 // specific language governing permissions and limitations
 // under the License.
 
-// This API is EXPERIMENTAL.
-
 #pragma once
 
-#include "arrow/engine/substrait/extension_set.h"
-#include "arrow/engine/substrait/extension_types.h"
-#include "arrow/engine/substrait/serde.h"
+#include <memory>
+
+#include "arrow/compute/exec/exec_plan.h"
+#include "arrow/type_fwd.h"
+
+namespace arrow {
+namespace engine {
+
+/// Information resulting from converting a Substrait relation.
+struct ARROW_ENGINE_EXPORT DeclarationInfo {
+  /// The compute declaration produced thus far.
+  compute::Declaration declaration;
+
+  std::shared_ptr<Schema> output_schema;
+};
+
+}  // namespace engine
+}  // namespace arrow
diff --git a/cpp/src/arrow/engine/substrait/relation_internal.h b/cpp/src/arrow/engine/substrait/relation_internal.h
index 514f3f97fc..df7804b679 100644
--- a/cpp/src/arrow/engine/substrait/relation_internal.h
+++ b/cpp/src/arrow/engine/substrait/relation_internal.h
@@ -22,6 +22,7 @@
 #include "arrow/compute/exec/exec_plan.h"
 #include "arrow/engine/substrait/extension_types.h"
 #include "arrow/engine/substrait/options.h"
+#include "arrow/engine/substrait/relation.h"
 #include "arrow/engine/substrait/serde.h"
 #include "arrow/engine/substrait/visibility.h"
 #include "arrow/type_fwd.h"
@@ -31,14 +32,6 @@
 namespace arrow {
 namespace engine {
 
-/// Information resulting from converting a Substrait relation.
-struct DeclarationInfo {
-  /// The compute declaration produced thus far.
-  compute::Declaration declaration;
-
-  std::shared_ptr<Schema> output_schema;
-};
-
 /// \brief Convert a Substrait Rel object to an Acero declaration
 ARROW_ENGINE_EXPORT
 Result<DeclarationInfo> FromProto(const substrait::Rel&, const ExtensionSet&,