-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Describe the bug
This was flagged by SDMTS.
False positives for the duplicate_fare_rule_zone_id_fields rule.
They only have (fare_id, route_id) fields defined, every row has a unique combination of both.
The spec mentions that the primary key for fare_rules.txt is (*) which means: all fields (reference)
They had duplicate_fare_rule_zone_id_fields triggered (which is an ERROR) and it looks like a problem with the way this rule is designed.
Steps/Code to Reproduce
- download dataset provided
- run validator
- open report
Expected Results
No issue with fare rules
Actual Results
The notice duplicate_fare_rule_zone_id_fields is triggered 296 times.
Screenshots
No response
Files used
Validator version
4.0.0
Operating system
MacOS
Java version
No response
Additional notes
Now that we support multiple @PrimaryKey annotations, we don't need to have the duplicate_fare_rule_zone_id_fields rule in this validator at all.
We can use the @PrimaryKey annotation in fare_rules.txt directly, and the notice duplicate_key will be triggered if we have duplicate records.