You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "AdamGS (via GitHub)" <gi...@apache.org> on 2026/05/28 20:15:57 UTC

Re: [PR] Add `file_row_index` UDF to query file-level row indexes from Parquet files [datafusion]

AdamGS commented on code in PR #22604:
URL: https://github.com/apache/datafusion/pull/22604#discussion_r3320384359


##########
datafusion/physical-expr/src/projection.rs:
##########
@@ -661,7 +661,7 @@ impl ProjectionExprs {
         for proj_expr in self.exprs.iter() {
             let expr = &proj_expr.expr;
             let col_stats = if let Some(col) = expr.downcast_ref::<Column>() {
-                std::mem::take(&mut stats.column_statistics[col.index()])
+                column_statistics_at(&stats.column_statistics, col.index())

Review Comment:
   Because I'm using `Column`, we currently assume it has stats. I think falling back here to `unknown` is reasonable.
   I think a follow up here might be to craft more accurate stats depending on what created the virtual column.



-- 
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-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org