Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Validation Error on datastore_search when sorting timestamp fields #4288
CKAN Version if known (or site URL)
Please describe the expected behaviour
The datastore_search API should be able to perform a distinct or sort on fields with a timestamp data type. A data table or data explorer resource view should be able to reorder rows based on a timestamp field.
Please describe the actual behaviour
A validation error is returned from the datastore_search API when performing a distinct or sort on fields with a timestamp data type. The data table and data explorer view can't reorder rows based on a timestamp field.
The problem seems to be that timestamps are converted to char than to json before sorting.
What steps can be taken to reproduce the issue?
Call the datastore_search endpoint with distinct=true and sorting on a timestamp field.
Returned Validation Error