zeroshade commented on a change in pull request #10995: URL: https://github.com/apache/arrow/pull/10995#discussion_r700471033
########## File path: cpp/src/arrow/dataset/c/api.h ########## @@ -0,0 +1,137 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include <stdint.h> + +#include "arrow/c/abi.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// For passing in as file format IDs and used to choose the correct file +// format class +#define DS_PARQUET_FORMAT 0 +#define DS_CSV_FORMAT 1 +#define DS_IPC_FORMAT 2 + +// propagate the special value for inspecting all fragments instead of the default +// that only inspects 1 fragment to get the schema +extern const int kInspectAllFragments; +#define DEFAULT_NUM_FRAGMENTS 1 +#define DISABLE_INSPECT_FRAGMENTS 0 + +// Analagous to arrow::dataset::Scanner +struct Scanner { Review comment: That's a fair assessment. In particular since doing this, i've decided to try a different approach and see how it goes, see #11037 where I've implemented consumer functions for the C Data interface for go. I'm looking into trying to just do a minimal binding to the Compute API directly instead and the building on top of that. If that ends up being viable, I'll close out this PR in favor of that approach. -- 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]
