Issue Casting TimeStamp Column to String/Text For CQL Filtering

Description

For the purposes of my project, I am allowing users to search a value against multiple columns (from a layer within GeoServer). I have decided to filter using the ILIKE operator for this comparison, so I need to be able to convert/cast the columns to String types. (I do not want to use data-specific operators in this case as I allow it elsewhere).

I couldn't find a casting function within the Filter Function References GeoServer documentation, so I used strConcate(Column, '%') as a workaround. I believe this works, since it returns a string and it combines the wildcard character '%' to the column which should return this value as a string.
The results from filtering on columns using this CQL filter worked in most cases, however, when I have a timestamp column type, I get inconsistent results when I try to filter on it using this method.

Example:
The timestamp column has data "2015-05-21 10:53:00".
If I search for "2015-05-21" the records with "2015-05-21 10:53:00" are returned successfully.
However, if I search for "2015-05-21 10:53" or just search using the time "10:53" I do not get any results. (The GeoServer logs show no errors and it seems to have run correctly, but it doesn't return the records)

Is there any other efficient way to cast column to String types in order to use the ILIKE operator on them or, if my solution works, is there a reason why my results are not being returned correctly? I believe the timestamp data is being casted to a string, because "2015-05-21" will return the values I am expected, however, I believe there might be another issue I am not aware of.

Thank you for your time.

Environment

Google Chrome

Assignee

Unassigned

Reporter

Zack Brown

Triage

Fix versions

None

Affects versions

Priority

Medium
Configure