GayathriSrividya commented on code in PR #3448: URL: https://github.com/apache/iceberg-python/pull/3448#discussion_r3342373979
########## pyiceberg/io/pyarrow.py: ########## Review Comment: Thanks for the suggestion! [pyarrow_filter](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) can be None when no row filter is specified (pure positional-delete scan), so we can't chain [.filter(pyarrow_filter)](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) directly without a guard. The current two-step form handles both cases. Happy to collapse it to a one-liner [current_batch.take(indices).filter(pyarrow_filter) if pyarrow_filter is not None else current_batch.take(indices)](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) if you'd prefer, though that ends up longer than the current form. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
