accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Turner <ke...@deenlo.com>
Subject Re: Quoted visibility equality?
Date Mon, 15 Jul 2013 13:23:59 GMT
On Sat, Jul 13, 2013 at 7:32 PM, Ed Kohlwey <ekohlwey@gmail.com> wrote:

> I just noticed something as I was hacking today on the trunk - does the new
> column visibility code (with escape sequences) accommodate visibilities
> that are equivalent but not stored using the same byte representation? My
> assumption is no...
>
> Ie., is the visibility "a&b" equivalent to "\"a\"&b" for the purpose of the
> max versions iterator, etc.?
>


I do not think the visibility "a&b" and  "\"a\"&b" are equivalent.   The
escaped quotes are not ignored, they are part of the label.  To
see  "\"a\"&b", you would need to pass an authorization of: "a"&b to the
scanner.   Passing an authorization of a&b to scan would not see a column
labeled with "\"a\"&b".

The exact bytes you pass to ColumnVis is whats stored.  The colvis bytes
are used for lexicographic sorting w/o interpreting their contents.
 So "a&b" and "\"a\"&b"  would sort to different places.

If you did store something thats logically equivalent like a&b and b&a,
then these would still sort to different places.    ColumnVisibility has a
flatten() function that may help in some cases, but it will not always
normalize two expressions that are logically equivalent to the exact same
expression.

Keith

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message