Skip to content
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

Unsupported query: mixed type addition in SELECT #19

Open
timgraham opened this issue Oct 9, 2019 · 1 comment
Open

Unsupported query: mixed type addition in SELECT #19

timgraham opened this issue Oct 9, 2019 · 1 comment

Comments

@timgraham
Copy link
Collaborator

timgraham commented Oct 9, 2019

For example:

======================================================================
ERROR: test_mixed_type_annotation_numbers (annotations.tests.NonAggregateAnnotationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.InvalidParameterValue: unsupported binary operator: <int> + <float>

Is there a plan to add support?

The SQL adds integer and float columns in a SELECT clause:

SELECT ... ("annotations_book"."pages" + "annotations_book"."rating") AS "combined"
FROM "annotations_book"
@timgraham timgraham changed the title Unsupported query: mixed type addition Unsupported query: mixed type addition in SELECT Oct 9, 2019
@timgraham
Copy link
Collaborator Author

cockroachdb/cockroach#16303 suggests this is by design and may not be fixed. Thoughts @rafiss?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant