shouriken opened a new issue, #64:
URL: https://github.com/apache/arrow-java/issues/64

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   I use this static method to write a parquet file into fs, I give empty 
partition array, so it will be in a file; and i give the `baseNameTemplate` arg 
is "test.parquet" to specify the filename, but it leads to an error: 
`basename_template did not contain '{i}'`.
   ```java
   public static void write(BufferAllocator allocator, ArrowReader reader, 
FileFormat format, String uri,
                              String[] partitionColumns, int maxPartitions, 
String baseNameTemplate) {
       try (final ArrowArrayStream stream = 
ArrowArrayStream.allocateNew(allocator)) {
         Data.exportArrayStream(allocator, reader, stream);
         JniWrapper.get().writeFromScannerToFile(stream.memoryAddress(),
             format.id(), uri, partitionColumns, maxPartitions, 
baseNameTemplate);
       }
     }
   ```
   read the cpp jni code and cpp dataset's code, the 
FileSystemDatasetWriteOptions::basename_template seems not supported to specify 
the file name without `{i}`.
   ```cpp
   /// \brief Options for writing a dataset.
   struct ARROW_DS_EXPORT FileSystemDatasetWriteOptions {
   .
   .
   .
     /// Template string used to generate fragment basenames.
     /// {i} will be replaced by an auto incremented integer.
     std::string basename_template;
   .
   .
   .
   }
   ```
   If there is any method to specify the filename when none partition?
   
   ### Component(s)
   
   Java


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to