-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
float
and int
unsupported binary operator
#82478
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I was unable to automatically find someone to ping. If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Okay, so I'm missing one final cast float at: WITH RECURSIVE per_investor_amount AS (
SELECT 0::int AS investors_number, 0.00::float AS investment_amount, 0.00::float AS individual_amount
UNION
SELECT (investors_number + 1)::int, i.investment_amount, i.investment_amount / (investors_number + 1)::float /* HERE */
FROM investment i, per_investor_amount pia WHERE investors_number < 3
)
SELECT * FROM per_investor_amount ORDER BY investment_amount, investors_number;
Still not sure if this is a bug (given postgres work?). |
cte recursive
incorrect type assumption?float
and int
unsupported binary operator
Hi @yuzefovich, I see you triage this, I've an update in reproduction (also updated the first post): # postgres
select 8::float / 8::int;
?column?
----------
1
(1 row) # cockroachdb
select 8::float / 8::int;
ERROR: unsupported binary operator: <float> / <int>
SQLSTATE: 22023 |
Hi @rafiss, could you please provide some context on where to look in the code base to get started with adding the explicit overloads? I have been out of code base for a while. |
Describe the problem
Here is a simple reproduction
(I'm deleting all old content for brevity because it all boil down to the reproduction above, you can check back via github history log)
Jira issue: CRDB-16414
The text was updated successfully, but these errors were encountered: