Skip to content

Bug in integer arithmetic meaning col1 - col2 becomes col2 - col2 #1261

@ryanvarley

Description

@ryanvarley

If you subtract two numeric columns from each other piccolo will subtract it from itself.

e.g.

class MyTable(Table):
    integer = Integer(null=True)
    other_integer = Integer(null=True)

print(MyTable.integer - MyTable.other_integer) produces other_integer - other_integer

As far as I can see there are no tests cases for column on column arithmetic.

PR Demonstrating the issue #1260

Metadata

Metadata

Assignees

No one assigned

    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