Re: [I] Failed optimizations with Int64 type [datafusion]

2025-04-05 Thread via GitHub
aectaan commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2743057983 @alamb What's the reason to cast numeric columns to i64/u64 and not to smallest compatible type? Why not to try something like this: ```rust macro_rules! try_parse_

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-21 Thread via GitHub
qazxcdswe123 commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2744966415 > [@alamb](https://github.com/alamb) What's the reason to cast numeric columns to i64/u64 and not to smallest compatible type? Why not to try something like this: >

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-20 Thread via GitHub
aectaan commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2739694259 Ok, probably it's related to `Analyzer`. After disabling it optimisations are ok -- This is an automated message from the Apache Git Service. To respond to the message, please

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-19 Thread via GitHub
aectaan commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2736607847 [repro.patch](https://github.com/user-attachments/files/19341418/repro.patch) Looks like datafusion-cli doesn't apply optimisations at all. After applying attached patch b

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
aectaan commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2735534960 That's interesting, same request performed via datafusion-cli returns without error that test have -- This is an automated message from the Apache Git Service. To respond to t

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
qazxcdswe123 commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2735134447 @alamb On head commit. ```csv col_int32,col_int64,col_uint32,col_utf8 1,1,0,a 2,2,1,b 3,3,2,c 4,4,3,d 5,5,4,e 6,6,5,f 7,7,6,g 8,8,7,h 9,9

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
aectaan commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2734472619 Thank you @alamb! No, it doesn't require anything custom. Unfortunately `datafusion-cli` parser fails at this request: doesn't like opening brace before WHERE - that's wh

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
alamb commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2734534317 > Unfortunately `datafusion-cli` parser fails at this request: doesn't like opening brace before WHERE - that's why I made it as a test. Maybe I missing something. Maybe yo

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
alamb commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2734063672 I wonder if you can get a pure SQL (`datafusion-cli` based) reproducer? Or does it require creating and configuring a custom context / optimizer rules 🤔 -- This is an automated

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
alamb commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2734059396 Thanks @aectaan -- 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 comme

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
alamb commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2732103208 Thanks @aectaan -- what is the error message that you get? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and us

Re: [I] Failed optimizations with Int64 type [datafusion]

2025-03-18 Thread via GitHub
aectaan commented on issue #15291: URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2732112476 @alamb it's related to common subexpr eliminate: ``` called `Result::unwrap()` on an `Err` value: Context("Optimizer rule 'common_sub_expression_eliminate' failed", SchemaE