parthchandra commented on code in PR #1593: URL: https://github.com/apache/datafusion-comet/pull/1593#discussion_r2037910025
########## common/src/main/java/org/apache/comet/parquet/NativeBatchReader.java: ########## @@ -496,25 +526,25 @@ private int loadNextBatch() throws Throwable { List<ColumnDescriptor> columns = requestedSchema.getColumns(); List<Type> fields = requestedSchema.getFields(); for (int i = 0; i < fields.size(); i++) { - // TODO: (ARROW NATIVE) check this. Currently not handling missing columns correctly? - if (missingColumns[i]) continue; - if (columnReaders[i] != null) columnReaders[i].close(); - // TODO: (ARROW NATIVE) handle tz, datetime & int96 rebase - DataType dataType = sparkSchema.fields()[i].dataType(); - Type field = fields.get(i); - NativeColumnReader reader = - new NativeColumnReader( - this.handle, - i, - dataType, - field, - null, - importer, - nativeUtil, - capacity, - useDecimal128, - useLegacyDateTimestamp); - columnReaders[i] = reader; + if (!missingColumns[i]) { + if (columnReaders[i] != null) columnReaders[i].close(); + // TODO: (ARROW NATIVE) handle tz, datetime & int96 rebase Review Comment: https://github.com/apache/datafusion-comet/issues/1638 -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org