Persistit.Key needs a way to indicate if the current segment is null
Bug #813573 reported by
Jack Orenstein
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban Persistit |
Fix Released
|
Medium
|
Nathan Williams |
Bug Description
I think it's likely that the query processor's Row abstraction will need an isNull method. This can be implemented by PersistitIndexRow by calling Key.decode() and seeing if the returned object is null. But one of the points of isNull is to avoid two decodes (one to check for null, another in case the field is not null). There are easy workarounds, but if
adding something like Key.decodesToNull() is an easy enhancement to Persistit, I think it will be generally useful.
affects: | akiban-adapter-mysql → akiban-persistit |
Changed in akiban-persistit: | |
status: | New → In Progress |
importance: | Wishlist → Medium |
assignee: | nobody → Nathan Williams (nwilliams) |
milestone: | none → jenia |
Changed in akiban-persistit: | |
status: | In Progress → Fix Committed |
Changed in akiban-server: | |
assignee: | nobody → Yuval Shavit (yshavit) |
Changed in akiban-server: | |
milestone: | none → puck |
Changed in akiban-server: | |
milestone: | puck → samba |
Changed in akiban-server: | |
status: | Confirmed → In Progress |
Changed in akiban-server: | |
status: | In Progress → Fix Committed |
Changed in akiban-server: | |
status: | Fix Committed → Fix Released |
information type: | Private → Public |
To post a comment you must log in.
Another use case for this is in retrieving a value that may be a primitive or a null. For instance, if we want to get a double, we can't just call key.decodeDouble() since it could be null. Instead, we have to call key.decode(), check if that's null, and then either unbox it or later call key.decodeDouble().
This is going to be somewhat important for the server, especially now that we support covering indexes.