Skip to content

Server error thrown if no data at all returned from query to ta_path #245

@Nate-Wessel

Description

@Nate-Wessel

Find this error here for example:
http://localhost:8072/aggregate-travel-times/863505565/1260558203/9/10/2026-01-03/2026-01-25/true/67

There is (erroneously, but still) no data for this corridor in ta_path and it seems that polars instead of returning an empty dataframe with the correct datatypes inferred from the DB columns, returns an empty dataframe with NULL datatypes?

Image

The error then happens here when it tries to join a string to a null?:

# join link lengths and
# calculate link travel times from speed and length (in seconds)
link_times_df = link_speeds_df.join(
links_df, on='link_dir'
).select( [

datatypes of join keys don't match - `link_dir`: null on left does not match `link_dir`: str on right

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions