added logic for clamping limit, asserting that the search query ends with a timechart command that uses a 'by' clause
merge