Skip to content

Commit b05e1ba

Browse files
xander-hirschderhuerst
authored andcommitted
use correct conditional for pickup/drop_off 🐛
Fix the stop_times table import by using the correct optional column conditional for the pickup_type and drop_off_type columns.
1 parent 90c5cc0 commit b05e1ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/stop_times.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ SELECT
7474
trip_id AS trip_id
7575
-- Casting an integer to an enum (using the index) is currently not possible, so we have to compute the availability index by hand using enum_range().
7676
-- DuckDB array/list indixes are 1-based.
77-
${has_pickup_type ? `,enum_range(NULL::pickup_drop_off_type)[drop_off_type + 1] AS drop_off_type` : ``}
78-
${has_drop_off_type ? `,enum_range(NULL::pickup_drop_off_type)[pickup_type + 1] AS pickup_type` : ``}
77+
${has_pickup_type ? `,enum_range(NULL::pickup_drop_off_type)[pickup_type + 1] AS pickup_type` : ``}
78+
${has_drop_off_type ? `,enum_range(NULL::pickup_drop_off_type)[drop_off_type + 1] AS drop_off_type` : ``}
7979
${has_timepoint ? `,enum_range(NULL::timepoint_v)[timepoint + 1] AS timepoint` : ''}
8080
),
8181
-- todo: is frequencies.txt relative to 1st arrival_time or departure_time?

0 commit comments

Comments
 (0)