@@ -137,6 +137,27 @@ public void testParquetProjector() throws Exception {
137137 AutoCloseables .close (factory );
138138 }
139139
140+ @ Test
141+ public void testEmptyProjector () throws Exception {
142+ ParquetWriteSupport writeSupport = ParquetWriteSupport .writeTempFile (AVRO_SCHEMA_USER , TMP .newFolder (), 1 , "a" ,
143+ 2 , "b" );
144+
145+ FileSystemDatasetFactory factory = new FileSystemDatasetFactory (rootAllocator (), NativeMemoryPool .getDefault (),
146+ FileFormat .PARQUET , writeSupport .getOutputURI ());
147+ ScanOptions options = new ScanOptions (new String []{}, Filter .EMPTY , 100 );
148+ Schema schema = inferResultSchemaFromFactory (factory , options );
149+ List <ArrowRecordBatch > datum = collectResultFromFactory (factory , options );
150+ org .apache .avro .Schema expectedSchema = truncateAvroSchema (writeSupport .getAvroSchema (), 0 , 1 );
151+
152+ assertSingleTaskProduced (factory , options );
153+ assertEquals (0 , schema .getFields ().size ());
154+ assertEquals (1 , datum .size ());
155+
156+ AutoCloseables .close (datum );
157+ AutoCloseables .close (factory );
158+ }
159+
160+
140161 @ Test
141162 public void testParquetBatchSize () throws Exception {
142163 ParquetWriteSupport writeSupport = ParquetWriteSupport .writeTempFile (AVRO_SCHEMA_USER , TMP .newFolder (),
0 commit comments