class TLDEventDataFilter extends EventDataQueryExpressionFilter {

    protected String getCurrentField(Key current) {
        ByteSequence cf = current.getColumnFamilyData();
        
        if (WritableComparator.compareBytes(cf.getBackingArray(), 0, 2, FI_CF, 0, 2) == 0) {
            ArrayList<Integer> nullIndexes = TLD.instancesOf(0, cf, 1);
            final int startFn = nullIndexes.get(0) + 1;
            final int stopFn = cf.length();
            
            byte[] fn = new byte[stopFn - startFn];
            
            System.arraycopy(cf.getBackingArray(), startFn + cf.offset(), fn, 0, stopFn - startFn);
            
            return JexlASTHelper.deconstructIdentifier(new String(fn));
        } else if (WritableComparator.compareBytes(cf.getBackingArray(), 0, 2, TF_CF, 0, 2) == 0) {
            ByteSequence cq = current.getColumnQualifierData();
            ArrayList<Integer> nullIndexes = TLD.lastInstancesOf(0, cq, 1);
            final int startFn = nullIndexes.get(0) + 1;
            final int stopFn = cq.length();
            
            byte[] fn = new byte[stopFn - startFn];
            
            System.arraycopy(cq.getBackingArray(), startFn + cq.offset(), fn, 0, stopFn - startFn);
            
            return JexlASTHelper.deconstructIdentifier(new String(fn));
        } else {
            final byte[] cq = current.getColumnQualifierData().getBackingArray();
            final int length = cq.length;
            int stopIndex = -1;
            for (int i = 0; i < length - 1; i++) {
                if (cq[i] == 0x00) {
                    stopIndex = i;
                    break;
                } else if (cq[i] == 0x2E) {
                    // test for '.' used in grouping notation
                    stopIndex = i;
                    break;
                }
            }
            
            return new String(cq, 0, stopIndex);
        }
    }

    public  TLDEventDataFilter(ASTJexlScript script, TypeMetadata attributeFactory, Set<String> whitelist, Set<String> blacklist, long maxFieldsBeforeSeek,
                    long maxKeysBeforeSeek);
    public  TLDEventDataFilter(ASTJexlScript script, TypeMetadata attributeFactory, Set<String> whitelist, Set<String> blacklist, long maxFieldsBeforeSeek,
                    long maxKeysBeforeSeek, Map<String,Integer> limitFieldsMap, String limitFieldsField, Set<String> nonEventFields);
    public  TLDEventDataFilter(TLDEventDataFilter other);

}