From df422c9673316b6a7ecdb96e314aeabd660985ad Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 29 Jun 2007 05:03:09 +0000 Subject: Fixed IllegalArgumentException with optimized join queries of the form "a.b = ? & (a.c = ? | a.d = ?)". --- .../com/amazon/carbonado/raw/GenericEncodingStrategy.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java') diff --git a/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java b/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java index d741c08..4c295dd 100644 --- a/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java +++ b/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java @@ -1462,8 +1462,8 @@ public class GenericEncodingStrategy { /** * Generates code to get a Lob from a locator from RawSupport. RawSupport - * instance and long locator must be on the stack. Result is a Lob on the - * stack, which may be null. + * instance, Storable instance, property name and long locator must be on + * the stack. Result is a Lob on the stack, which may be null. */ private void getLobFromLocator(CodeAssembler a, StorablePropertyInfo info) { if (!info.isLob()) { @@ -1481,7 +1481,8 @@ public class GenericEncodingStrategy { } a.invokeInterface(TypeDesc.forClass(RawSupport.class), name, - type, new TypeDesc[] {TypeDesc.LONG}); + type, new TypeDesc[] {TypeDesc.forClass(Storable.class), + TypeDesc.STRING, TypeDesc.LONG}); } ///////////////////////////////////////////////////////////////////////////////// @@ -1601,6 +1602,11 @@ public class GenericEncodingStrategy { if (info.isLob()) { // Need RawSupport instance for getting Lob from locator. pushRawSupport(a, instanceVar); + + // Also need to pass this stuff along when getting Lob. + a.loadThis(); + a.loadConstant(info.getPropertyName()); + // Locator is encoded as a long. storageType = TypeDesc.LONG; } -- cgit v1.2.3