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

   ### Describe the bug
   
   As pointed here: 
https://github.com/apache/datafusion/pull/12946/files#r1803027063
   
   window frame definition `SUM(id) OVER (PARTITION BY first_name ROWS BETWEEN 
5 PRECEDING AND 2 FOLLOWING)` is incorrectly unparsed as `SUM(id) OVER 
(PARTITION BY first_name ROWS BETWEEN '5' PRECEDING AND '2' FOLLOWING)`
   
   long literals 5 and 2 are converted to string literals '5' and '2'
   
   
   ### To Reproduce
   
   The following test can be used
   
   ```
   #[test]
   fn test_aggregation_to_sql() {
       sql_round_trip(
           GenericDialect {},
           r#"SELECT id, first_name,
           SUM(id) OVER (PARTITION BY first_name ROWS BETWEEN 5 PRECEDING AND 2 
FOLLOWING) AS moving_sum
           FROM person
           GROUP BY id, first_name;"#,
           r#"SELECT person.id, person.first_name, SUM(person.id) OVER 
(PARTITION BY person.first_name ROWS BETWEEN 5 PRECEDING AND 2 FOLLOWING) AS 
moving_sum FROM person GROUP BY person.id, person.first_name"#,
       );
   }
   ```
   
   ### Expected behavior
   
   _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-unsubscr...@datafusion.apache.org.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

Reply via email to