Re: [I] date_part returning wrong results due to overflows [datafusion]

2025-02-18 Thread via GitHub
Omega359 commented on issue #14738: URL: https://github.com/apache/datafusion/issues/14738#issuecomment-2666570269 > It seems like even without integer overflows, the overall logic is wrong: > > ``` > SELECT date_part('seconds', interval '1 hour') > -- returns 3600, but the resul

Re: [I] date_part returning wrong results due to overflows [datafusion]

2025-02-17 Thread via GitHub
gabotechs commented on issue #14738: URL: https://github.com/apache/datafusion/issues/14738#issuecomment-2664836889 It seems like even without integer overflows, the overall logic is wrong: ``` SELECT date_part('seconds', interval '1 hour') -- returns 3600, but the result should be 0

Re: [I] date_part returning wrong results due to overflows [datafusion]

2025-02-17 Thread via GitHub
gabotechs commented on issue #14738: URL: https://github.com/apache/datafusion/issues/14738#issuecomment-2664833514 It can also be replicated with intervals: ```sql SELECT date_part('microseconds', interval '1 hour') -- returns -694967296, but the result should be 0 ```