Skip to content

sql: comparison of float and int #3266

@madelynnblue

Description

@madelynnblue

The following sqllogictest fails with the error:

unsupported comparison operator: <float> < <int>

https://github.com/cockroachdb/sqllogictest/blob/a88396b84bb1fe62edf2e072e585d68c0b2ecdca/test/select1.test#L94

Which makes sense because c is an INTEGER, and the call to avg returns a float. This test is currently disabled for other reasons, but when enabled will fail here. We could decide to either

  1. Disable this test. This would involve coming up with a way to selectively disable portions of sqllogic tests, instead of just disabling entire files. It would also mean we are choosing to be more strict than other SQL implementations.
  2. Implement float and int comparisons.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions