karan-k-deepr opened a new issue #1022:
URL: https://github.com/apache/orc/issues/1022


   This question is similar to [THIS one][1] I asked before on StackOverflow, 
which after some more trials it works.<br>
   Previously there was some issue with the column Id but now I am trying to 
filter a column of `DECIMAL` data type but always results give me all the data 
instead of the filtered one.
   <br><br>
   Data which ORC file has in the required columns:<br>
   [![enter image description here][2]][2]
   
   And this is how I am trying to filter out the `DECIMAL` column using 
`orc::SearchArgument`:
   ```
   orc::RowReaderOptions m_RowReaderOpts;
   orc::ReaderOptions m_ReaderOpts;
   
   std::unique_ptr<orc::Reader> m_Reader;
   std::unique_ptr<orc::RowReader> m_RowReader;
   
   auto builder = orc::SearchArgumentFactory::newBuilder();
   const int snapshot_time_col_id = 22;
   
   orc::Literal ss_begin_time{34080, 14, 9};
   orc::Literal ss_end_time{34380, 14, 9};
   
   builder->between(snapshot_time_col_id, orc::PredicateDataType::DECIMAL, 
ss_begin_time, ss_end_time);
   
   m_RowReaderOpts.searchArgument(builder->build());
   reader = orc::createReader(orc::readFile(a_FilePath.c_str()), m_ReaderOpts);
   row_reader = reader->createRowReader(m_RowReaderOpts);
   ```
   <br>
   Please give some suggestions on how to filter data of type DECIMAL? 
   <br>
   
   
     [1]: 
https://stackoverflow.com/questions/70517692/c-apache-orc-is-not-filtering-data-correctly
     [2]: https://i.stack.imgur.com/AbPx3.png


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