由于有多个要求解释此答案,因此已发布此附加答案。
示例 1
如果
scan '<table>', { COLUMNS => '<column>', LIMIT => 3 }
会返回:
ROW COLUMN+CELL
ROW1 column=<column>, timestamp=<timestamp>, value=hello_value
ROW2 column=<column>, timestamp=<timestamp>, value=hello_value2
ROW3 column=<column>, timestamp=<timestamp>, value=hello_value3
然后这个过滤器:
scan '<table>', { COLUMNS => '<column>', LIMIT => 3, FILTER => "ValueFilter( =, 'binaryprefix:hello_value2') AND ValueFilter( =, 'binaryprefix:hello_value3')" }
会返回:
ROW COLUMN+CELL
ROW2 column=<column>, timestamp=<timestamp>, value=hello_value2
ROW3 column=<column>, timestamp=<timestamp>, value=hello_value3
示例 2
如果不支持:
scan '<table>', { COLUMNS => '<column>', LIMIT => 3, FILTER => "ValueFilter( !=, 'binaryprefix:hello_value2' )" }
会返回:
ROW COLUMN+CELL
ROW1 column=<column>, timestamp=<timestamp>, value=hello_value
ROW3 column=<column>, timestamp=<timestamp>, value=hello_value3