[
https://issues.apache.org/jira/browse/ORC-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385067#comment-15385067
]
ASF GitHub Bot commented on ORC-58:
-----------------------------------
Github user omalley commented on a diff in the pull request:
https://github.com/apache/orc/pull/41#discussion_r71443174
--- Diff: c++/src/Reader.cc ---
@@ -1062,37 +1062,36 @@ namespace orc {
// PASS
}
+ RowReader::~RowReader() {
+ // PASS
+ }
+
static const uint64_t DIRECTORY_SIZE_GUESS = 16 * 1024;
- class ReaderImpl : public Reader {
+ class ReaderImpl;
+
+ class RowReaderImpl : public RowReader {
private:
const Timezone& localTimezone;
// inputs
- std::unique_ptr<InputStream> stream;
- ReaderOptions options;
- const uint64_t fileLength;
- const uint64_t postscriptLength;
std::vector<bool> selectedColumns;
-
+ std::shared_ptr<InputStream> stream;
--- End diff --
I'd suggest creating a single class that has all of the state for the
ReaderImpl. Then it can have the postscript, InputStream, etc. and be shared
between the ReaderImpl and the set of RowReaderImpls that share the same
ReaderImpl.
> Move code for reading rows from Reader to RowReader
> ---------------------------------------------------
>
> Key: ORC-58
> URL: https://issues.apache.org/jira/browse/ORC-58
> Project: Orc
> Issue Type: Improvement
> Components: C++
> Reporter: Deepak Majeti
>
> Existing ReaderImpl constructor can throw an exception. This prohibits the
> creation of the reader instance and subsequent access to the schema
> information.
> For instance, an exception can be thrown if the selected column ids do not
> agree with the number of schema columns. The downstream application might
> still want the schema information for logging purposes.
> The scope of this Jira is to move the code to read rows into a new RowReader
> class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)