Skip to content

Selecting boolean values is failing #57

@nischays

Description

@nischays

Running a sql like

SELECT CASE WHEN (UNIX_TIMESTAMP(unloading_time.unloading_start_time) - UNIX_TIMESTAMP(delivery_schedule.schedule_time)) < (-30 * 60) THEN TRUE ELSE FALSE END as was_30_minutes_earlier from unloading_time INNER JOIN delivery_schedule ON unloading_time.delivery_schedule_id = delivery_schedule.schedule_id 

causes the following error:

Cannot run task: module 'numpy' has no attribute 'bool'. np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

There is a work around for this, instead of using TRUE use 1 and for FALSE use 0

Easy way to reproduce this is by just trying to execute

SELECT TRUE

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