[C++][Java] When i use DatasetFileWriter::write method write a file, I can't specify a file name
- Lenguaje dominante
- Java
- Estrellas
- 94
- Forks
- 152
- Merge medio
- 3 d 16 h
- PR fusionados (30 d)
- 11
Descripción
### 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
Guía de contribución
Línea de trabajo
Comienza con Java DatasetFileWriter::write y la llamada JNI a writeFromScannerToFile; después inspecciona C++ FileSystemDatasetWriteOptions::basename_template. Determina si una escritura no particionada puede aceptar un nombre de archivo exacto sin {i}; la tarea está terminada cuando se haya establecido el comportamiento compatible y la ruta Java/C++ gestione ese caso o lo documente claramente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp, java
- Área
- data-engineering
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100