You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "sgrebnov (via GitHub)" <gi...@apache.org> on 2024/10/17 07:10:18 UTC

[I] Unparser: numeric values in window frame definition are converted to string literals [datafusion]

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-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] Unparser: numeric values in window frame definition are converted into string literals [datafusion]

Posted by "goldmedal (via GitHub)" <gi...@apache.org>.
goldmedal closed issue #12982: Unparser: numeric values in window frame definition are converted into string literals
URL: https://github.com/apache/datafusion/issues/12982


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


Re: [I] Unparser: numeric values in window frame definition are converted into string literals [datafusion]

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

   This got fixed in the PR #13059.


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