Skip to content
  • Cheng Lian's avatar
    7ea6d282
    [SPARK-16703][SQL] Remove extra whitespace in SQL generation for window functions · 7ea6d282
    Cheng Lian authored
    ## What changes were proposed in this pull request?
    
    This PR fixes a minor formatting issue of `WindowSpecDefinition.sql` when no partitioning expressions are present.
    
    Before:
    
    ```sql
    ( ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    ```
    
    After:
    
    ```sql
    (ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    ```
    
    ## How was this patch tested?
    
    New test case added in `ExpressionSQLBuilderSuite`.
    
    Author: Cheng Lian <lian@databricks.com>
    
    Closes #14334 from liancheng/window-spec-sql-format.
    7ea6d282
    [SPARK-16703][SQL] Remove extra whitespace in SQL generation for window functions
    Cheng Lian authored
    ## What changes were proposed in this pull request?
    
    This PR fixes a minor formatting issue of `WindowSpecDefinition.sql` when no partitioning expressions are present.
    
    Before:
    
    ```sql
    ( ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    ```
    
    After:
    
    ```sql
    (ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    ```
    
    ## How was this patch tested?
    
    New test case added in `ExpressionSQLBuilderSuite`.
    
    Author: Cheng Lian <lian@databricks.com>
    
    Closes #14334 from liancheng/window-spec-sql-format.
Loading