litao3rd opened a new issue, #37556:
URL: https://github.com/apache/arrow/issues/37556

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I am a novice in Apache Arrow, and I'm not sure if this is a best practice. 
   
   When I tried to compile the demo code, compiler returned an error message: 
'/usr/local/include/arrow/result.h:276:50: error: no match for 'operator==' 
(operand types are 'const arrow::dataset::TaggedRecordBatch' and 'const 
arrow::dataset::TaggedRecordBatch'). 
   
   ```demo.cc
   #include <iostream>
   #include <string>
   
   #include <arrow/api.h>
   #include <arrow/dataset/api.h>
   #include <arrow/filesystem/api.h>
   
   namespace ds = arrow::dataset;
   namespace fs = arrow::fs;
   
   void scan_dataset(
           const std::shared_ptr<fs::FileSystem> &filesystem,
           const std::shared_ptr<ds::FileFormat> &format,
           const std::string &base_dir)
   {
       fs::FileSelector selector;
       selector.base_dir = base_dir;
       auto factory = ds::FileSystemDatasetFactory::Make(filesystem, selector, 
format, ds::FileSystemFactoryOptions())
                       .ValueOrDie();
       auto dataset = factory->Finish().ValueOrDie();
       auto sb = dataset->NewScan().ValueOrDie();
       auto sc = sb->Finish().ValueOrDie();
       auto batches = sc->ScanBatches();
   
       // error message  is caused by below code
       for(auto batch = batches->begin(); batch != batches->end(); ++batch) {
   
       }
   }
   
   int main(int argc, char **argv)
   {
       auto filesystem = std::make_shared<fs::LocalFileSystem>();
       auto format = std::make_shared<ds::ParquetFileFormat>();
       const std::string base_dir = "/path/to/dataset/base";
   
       scan_dataset(filesystem, format, base_dir);
   }
   ```
   
   It looks like TaggedRecordBatch hasn't implemented the overload for the 
operator== method. Should I add an implementation, or am I not supposed to use 
TaggedRecordBatchIterator this way?
   
   ### Component(s)
   
   C++


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