aweltsch commented on issue #13782: URL: https://github.com/apache/datafusion/issues/13782#issuecomment-2570816352
Thanks for your response @Omega359, I agree that the unexpected result is calculated due to calculations using the `REAL` type. For me the main surprise was that `nullif(1, 2::REAL)` is of `REAL` type in datafusion, since I don't think this is the case with some other DB systems like duckdb (integer) or postgres (double precision). I also agree that `SELECT 1::REAL` is shown as `Int64(1)` looks like a bug, but I'm not sure if that is related to REAL only, because ```sql SELECT 1::DOUBLE; +----------+ | Int64(1) | +----------+ | 1.0 | +----------+ ``` is also shown as Int64 in datafusion. Using `arrow_typeof` instead shows what I would expect ```sql > SELECT arrow_typeof(1::DOUBLE); +------------------------+ | arrow_typeof(Int64(1)) | +------------------------+ | Float64 | +------------------------+ > SELECT arrow_typeof(1::REAL); +------------------------+ | arrow_typeof(Int64(1)) | +------------------------+ | Float32 | +------------------------+ ``` -- 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 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