Persistit.Key needs a way to indicate if the current segment is null

Bug #813573 reported by Jack Orenstein
6
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
Revision history for this message
Yuval Shavit (yshavit) wrote :

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.

Changed in akiban-server:
importance: Undecided → Medium
status: New → Confirmed
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
Revision history for this message
Nathan Williams (nwilliams) wrote :

Added to Persistit in r198.

Changed in akiban-persistit:
status: Fix Committed → Fix Released
Yuval Shavit (yshavit)
Changed in akiban-server:
assignee: nobody → Yuval Shavit (yshavit)
Changed in akiban-server:
milestone: none → puck
Ariel Weil (aweil)
Changed in akiban-server:
milestone: puck → samba
Yuval Shavit (yshavit)
Changed in akiban-server:
status: Confirmed → In Progress
Yuval Shavit (yshavit)
Changed in akiban-server:
status: In Progress → Fix Committed
Yuval Shavit (yshavit)
Changed in akiban-server:
status: Fix Committed → Fix Released
information type: Private → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.