Value.getType() is not reliable for CLASS_REREF
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban Persistit |
Fix Released
|
Medium
|
Peter Beaman |
Bug Description
It always returns java.lang.
It is a little tricky to get reference equal Objects into a Value in the server. First because the normal persistent format is RowData and second because parsed / computed objects tend to be only equals(). However, Sort_Tree uses Values and system tables have some constant string values and some functions return a string rather than computing it.
So the following will show the problem:
SELECT character_
SELECT s1, s2 FROM (SELECT id, CURRENT_USER AS s1, CURRENT_USER AS s2 FROM t2 LIMIT 5) AS x ORDER BY 1;
It is not just strings. This would, too, except for other bugs that happen first:
SELECT d1, d2 FROM (SELECT id, CAST(1 AS DECIMAL(2,1)) AS d1, CAST(1 AS DECIMAL(2,1)) AS d2 FROM t2 LIMIT 5) AS x ORDER BY 1;
Related branches
- Akiban Build User: Needs Fixing
- Nathan Williams: Approve
-
Diff: 838 lines (+226/-528)4 files modifiedsrc/main/java/com/persistit/Key.java (+22/-0)
src/main/java/com/persistit/Value.java (+74/-3)
src/test/java/com/persistit/unit/KeyTest1.java (+25/-0)
src/test/java/com/persistit/unit/ValueTest4.java (+105/-525)
Changed in akiban-persistit: | |
assignee: | nobody → Peter Beaman (pbeaman) |
importance: | Undecided → Medium |
status: | New → Fix Committed |
milestone: | none → 3.2.1 |
information type: | Proprietary → Public |
Changed in akiban-server: | |
assignee: | nobody → Yuval Shavit (yshavit) |
status: | New → In Progress |
milestone: | none → 1.4.4 |
Changed in akiban-server: | |
status: | In Progress → Fix Committed |
I'm creating a workaround for now in the server; see lp:~yshavit/akiban-server/t3_PKPVS-workaround.