[ https://issues.apache.org/jira/browse/ARROW-1920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302663#comment-16302663 ]
ASF GitHub Bot commented on ARROW-1920: --------------------------------------- jcrist commented on a change in pull request #1418: ARROW-1920 [C++/Python] Add ORC Reader URL: https://github.com/apache/arrow/pull/1418#discussion_r158593428 ########## File path: cpp/src/arrow/adapters/orc/adapter.h ########## @@ -0,0 +1,65 @@ +// 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. + +#ifndef ARROW_ORC_CONVERTER_H +#define ARROW_ORC_CONVERTER_H + +#include <cstdint> +#include <list> +#include <memory> + +#include "arrow/io/interfaces.h" +#include "arrow/memory_pool.h" +#include "arrow/record_batch.h" +#include "arrow/status.h" +#include "arrow/type.h" +#include "arrow/util/visibility.h" + +namespace arrow { + +namespace adapters { + +namespace orc { + +class ARROW_EXPORT ORCFileReader { + public: + ~ORCFileReader(); + static Status Open(const std::shared_ptr<io::ReadableFileInterface>& file, + MemoryPool* pool, std::unique_ptr<ORCFileReader>* reader); + Status ReadSchema(std::shared_ptr<Schema>* out); + Status Read(std::shared_ptr<RecordBatch>* out); + Status Read(const std::list<uint64_t>& include_indices, + std::shared_ptr<RecordBatch>* out); Review comment: Ok, I've changed the `Read` method to return a table composed of one record batch per stripe. I'm not sure if this is the best api - could also see returning a table composed of fixed-length record batches given a user proved batch-size (which would be equally efficient, since we have to copy the data either way). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add support for reading ORC files > --------------------------------- > > Key: ARROW-1920 > URL: https://issues.apache.org/jira/browse/ARROW-1920 > Project: Apache Arrow > Issue Type: New Feature > Components: C++, Python > Reporter: Jim Crist > Labels: pull-request-available > > Would be nice to be able to read ORC files in pyarrow, similar to the already > existing parquet support. -- This message was sent by Atlassian JIRA (v6.4.14#64029)