def filters_from_key_value_pair(kvp)
      kvp[:qualifier] = kvp[:column].split(':')
      kvp[:column] = kvp[:qualifier].shift
      if (kvp[:condition].to_s != "LIKE")
        "(SingleColumnValueFilter('#{kvp[:column]}','#{kvp[:qualifier].join(':')}',#{kvp[:condition]},'binary:#{kvp[:value]}',true,true))"
      else
        kvp[:value] = Regexp.escape(kvp[:value])
        kvp[:value].sub!(/^%/,"^.*")
        kvp[:value].sub!(/%$/,".*$")
        while kvp[:value].match(/([^\\]{1,1})%/)
          kvp[:value].sub!(/([^\\]{1,1})%/,"#{$1}.*?")
        end
        kvp[:value].sub!(/^_/,"^.")
        kvp[:value].sub!(/_$/,".$")
        while kvp[:value].match(/([^\\]{1,1})_/)
          kvp[:value].sub!(/([^\\]{1,1})_/,"#{$1}.")
        end
        "(SingleColumnValueFilter('#{kvp[:column]}','#{kvp[:qualifier].join(':')}',=,'regexstring:#{kvp[:value]}',true,true))"
      end
    end
def filters_from_key_value_pair(kvp)
      kvp[:qualifier] = kvp[:column].split(':')
      kvp[:column] = kvp[:qualifier].shift
      if (kvp[:condition].to_s != "LIKE")
        "(SingleColumnValueFilter('#{kvp[:column]}','#{kvp[:qualifier].join(':')}',#{kvp[:condition]},'binary:#{kvp[:value]}',true,true))"
      else
        kvp[:value] = Regexp.escape(kvp[:value])
        kvp[:value].sub!(/^%/,"^.*")
        kvp[:value].sub!(/%$/,".*$")
        while kvp[:value].match(/([^\\]{1,1})%/)
          kvp[:value].sub!(/([^\\]{1,1})%/,"#{$1}.*?")
        end
        kvp[:value].sub!(/^_/,"^.")
        kvp[:value].sub!(/_$/,".$")
        while kvp[:value].match(/([^\\]{1,1})_/)
          kvp[:value].sub!(/([^\\]{1,1})_/,"#{$1}.")
        end
        "(SingleColumnValueFilter('#{kvp[:column]}','#{kvp[:qualifier].join(':')}',=,'regexstring:#{kvp[:value]}',true,true))"
      end
    end
Generate a Thrift QualifierFilter and ValueFilter from key value pair.