Skip to content

sql: integer division returns float, sqllogic test expects int #3271

@madelynnblue

Description

@madelynnblue

The following (currently disabled) test performs integer division. Cockroach returns a float instead of the expected int. Integer division is the only binary operator that takes integers and returns a float.

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

I propose allowing the test logic to accept both ints and floats when it expects an int. This would allow any sqllogic test using integer division to succeed. It would be an additional if statement at

case 'I':
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-semanticsC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions