You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "devampatel03 (via GitHub)" <gi...@apache.org> on 2025/09/26 12:15:03 UTC

[I] Normalize output column names for Window Functions to improve consistency [datafusion]

devampatel03 opened a new issue, #17790:
URL: https://github.com/apache/datafusion/issues/17790

   ### Is your feature request related to a problem or challenge?
   
   Yes. While working on PR #17690 to fix alias naming issue (#17469), I noticed that the default output column name for `window functions` is inconsistent and overly verbose.
   
   Currently, when a window function is used, the output column name includes the entire `OVER` clause (e.g., `PARTITION BY`, `ORDER BY`, etc.). This is undesirable because:
   1. It creates extremely long and hard to read column headers.
   2. It's inconsistent with other scalar and aggregate functions, which do not include these clauses in their column name.
   
   
   ### Describe the solution you'd like
   
   I propose that we normalize the default output column naming for the `window functions`. The output column name should only include the function's name and its immediate arguments, not the details of the `OVER` clause.
   
   * **Current Behavior:**
       The output column name is `odd_counter(t.val) PARTITION BY [t.x] ORDER BY [t.y ASC NULLS LAST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW`.
   
   * **Desired Behavior:**
       The column name should simply be `odd_counter(t.val)`.
   
   This would make the behavior of `window functions` consistent with other functions and significantly improve the readability of query results.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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.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


Re: [I] Normalize output column names for Window Functions to improve consistency [datafusion]

Posted by "devampatel03 (via GitHub)" <gi...@apache.org>.
devampatel03 commented on issue #17790:
URL: https://github.com/apache/datafusion/issues/17790#issuecomment-3338414873

   take


-- 
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