   if newFilterPieces.length > 1
     return {
       type: 'and'
-      operation: 'filter'
       filters: newFilterPieces
     }
 
   return newFilterPieces[0]
-
-createFilter = (value, splitOp) ->
-  if splitOp.bucket in ['timePeriod', 'timeDuration']
-    newFilterPiece = {
-      attribute: splitOp.attribute
-      operation: 'filter'
-      type: 'within'
-      value: value.map((time) -> if time instanceof Date then time.toISOString() else time)
-    }
-  else
-    newFilterPiece = {
-      attribute: splitOp.attribute
-      operation: 'filter'
-      type: 'is'
-      value
-    }
-  return newFilterPiece
 
 class FilterCache
   # { key: filter,

    when 'match'     then "F:#{filter.attribute}:#{filter.expression}"
    when 'within'    then "W:#{filter.attribute}:#{filter.range[0].valueOf()}:#{filter.range[1].valueOf()}"
    when 'not'       then "N(#{filterToHashHelper(filter.filter)})"
    when 'and'       then "A:(#{filter.filters.map(filterToHashHelper).join(')(')})"
    when 'or'        then "O:(#{filter.filters.map(filterToHashHelper).join(')(')})"
    else throw new Error("unsupported filter type")

filterToHash = (filter) ->

    splits = []

    for value in cachedValues
      newFilter = addToFilter(filter, timeAttribute, driverUtil.filterFromSplit(splitOp, value))
      ret = getKnownTreeHelper(condensedQuery, newFilter, level + 1, value)
      ret.prop[splitOp.name] = value
      splits.push ret
