Re: Remove a specific type coersion rule

2024-02-23 Thread Julian Hyde
Sorry I didn’t fully read your message, Gonzalo. I’m very busy this week, so I am focusing on strategy rather than implementation. The right solution is probably to link the map of type coercions to the connection’s conformance. That will allow Calcite to receive SQL and pretend to be (say)

Re: [DISCUSS] Towards Calcite 1.37.0

2024-02-23 Thread Julian Hyde
+1 for a release. Our users rely on a regular cadence of releases. If someone submits a patch and doesn’t see it in a release until 6 months later (or it sits un-reviewed) they will be less inclined to submit a patch. Yeah, I know Open Source Doesn’t Require Providing Builds [1] but it makes

Re: Remove a specific type coersion rule

2024-02-23 Thread Mihai Budiu
It looks to me like whatever semantics Pinot desires, it would still be useful to have pluggable semantics for casts. So perhaps a new issue should be opened for that; it looks like the existing framework isn't sufficient. In the meantime we can probably also accept the solution in CALCITE-6210

Re: Some questions about calcite

2024-02-23 Thread Mihai Budiu
Calcite supports infinities, but has some trouble computing using infinities as literals, because literals are represented as decimal values internally. The following PR https://github.com/apache/calcite/pull/3663 fixes this problem, but has not been reviewed. The net outcome of the PR is that

[jira] [Created] (CALCITE-6279) Use Null to replace the results of some Math functions that return NaN.

2024-02-23 Thread Caican Cai (Jira)
Caican Cai created CALCITE-6279: --- Summary: Use Null to replace the results of some Math functions that return NaN. Key: CALCITE-6279 URL: https://issues.apache.org/jira/browse/CALCITE-6279 Project:

Re: Some questions about calcite

2024-02-23 Thread Cancai Cai
Hi, Tanner Clary I also found that some sql functions return java's double.NaN when it is empty, instead of sql's null. Maybe I will raise a jira to discuss this. Best wishes, Cancai Cai Cancai Cai 于2024年2月24日周六 00:32写道: > Tanner Clary, > > Thank you very much for your help. I didn't expect

Re: Some questions about calcite

2024-02-23 Thread Cancai Cai
Tanner Clary, Thank you very much for your help. I didn't expect it to work like this. I learned interesting knowledge. It seems that the infinity conversion is indeed not converted to double, but converted to BigDecimal type. I have left a message on jira and I will try to solve it. Thank you

Re: Some questions about calcite

2024-02-23 Thread Tanner Clary
Cancai, I have authored a commit that shows you how to allow functions with non-null operands to return null [1]. Feel free to use this in your PR. As for infinity, Calcite supports infinity, although I believe you need to wrap it in a cast to double (at least in my experience). If some dialect