ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: sql-store Compare values without unmarshalling.
Date Wed, 10 Feb 2016 13:46:23 GMT
Repository: ignite
Updated Branches:
  refs/heads/sql-store-cmp db664f038 -> 20b91e413


sql-store Compare values without unmarshalling.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/20b91e41
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/20b91e41
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/20b91e41

Branch: refs/heads/sql-store-cmp
Commit: 20b91e413303a55a4017ad3f0be4c495888d7460
Parents: db664f0
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Feb 10 13:30:01 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Feb 10 16:13:00 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/binary/BinaryField.java   |   5 +-
 .../ignite/internal/binary/BinaryFieldImpl.java |  89 ++++++--
 .../internal/binary/BinaryReaderExImpl.java     |   8 +
 .../processors/query/GridQueryProcessor.java    | 202 ++++++++++++++-----
 .../processors/query/GridQueryProperty.java     |   4 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |   2 +-
 6 files changed, 236 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/20b91e41/modules/core/src/main/java/org/apache/ignite/binary/BinaryField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryField.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryField.java
index 3094b85..6672c0c 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryField.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryField.java
@@ -52,8 +52,9 @@ public interface BinaryField {
     public int fieldOffset(long addr, int len);
 
     /**
-     * @param obj Object.
+     * @param valBytes Marshalled Object.
+     * @param off Marshalled object offset.
      * @return Field offset.
      */
-    public int fieldOffset(BinaryObject obj);
+    public int fieldOffset(byte[] valBytes, int off);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/20b91e41/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryFieldImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryFieldImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryFieldImpl.java
index e8587f3..bcfba00 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryFieldImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryFieldImpl.java
@@ -26,6 +26,7 @@ import java.util.Date;
 import java.util.UUID;
 import org.apache.ignite.binary.BinaryObjectException;
 import org.apache.ignite.internal.binary.streams.BinaryByteBufferInputStream;
+import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream;
 import org.apache.ignite.internal.binary.streams.BinaryOffheapInputStream;
 import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -34,6 +35,7 @@ import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.binary.BinaryField;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.apache.ignite.internal.binary.GridBinaryMarshaller.*;
 
 /**
  * Implementation of binary field descriptor.
@@ -105,17 +107,60 @@ public class BinaryFieldImpl implements BinaryFieldEx {
     }
 
     /** {@inheritDoc} */
-    @Override public int fieldOffset(BinaryObject obj) {
-        BinaryObjectExImpl obj0 = (BinaryObjectExImpl)obj;
+    @Override public int fieldOffset(byte[] valBytes, int off) {
+        int typeId = BinaryPrimitives.readInt(valBytes, off + TYPE_ID_POS);
 
-        int order = fieldOrder(obj0);
+        if (typeId != this.typeId) {
+            throw new BinaryObjectException("Failed to get field because type ID of passed
object differs" +
+                " from type ID this " + BinaryField.class.getSimpleName() + " belongs to
[expected=" + this.typeId +
+                ", actual=" + typeId + ']');
+        }
+
+        int schemaId = BinaryPrimitives.readInt(valBytes, off + SCHEMA_ID_POS);
+
+        BinarySchema schema = schemas.schema(schemaId);
+
+        if (schema == null) {
+            BinaryHeapInputStream in = BinaryHeapInputStream.create(valBytes, off);
+
+            BinaryObjectExImpl obj = (BinaryObjectExImpl)BinaryUtils.unmarshal(in, ctx, null);
+
+            assert obj != null;
+
+            schema = obj.createSchema();
+        }
+
+        assert schema != null;
+
+        int order = schema.order(fieldId);
+
+        if (order == BinarySchema.ORDER_NOT_FOUND)
+            return -1;
+
+        int schemaOff = BinaryPrimitives.readInt(valBytes, off + SCHEMA_OR_RAW_OFF_POS);
+
+        short flags = BinaryPrimitives.readShort(valBytes, off + FLAGS_POS);
+
+        int fieldIdLen = BinaryUtils.isCompactFooter(flags) ? 0 : BinaryUtils.FIELD_ID_LEN;
+        int fieldOffLen = BinaryUtils.fieldOffsetLength(flags);
+
+        int fieldOffPos = schemaOff + order * (fieldIdLen + fieldOffLen) + fieldIdLen;
+
+        int fieldOff;
 
-        return order != BinarySchema.ORDER_NOT_FOUND ? obj0.fieldOffsetByOrder(order) : -1;
+        if (fieldOffLen == BinaryUtils.OFFSET_1)
+            fieldOff = ((int)BinaryPrimitives.readByte(valBytes, off + fieldOffPos) &
0xFF);
+        else if (fieldOffLen == BinaryUtils.OFFSET_2)
+            fieldOff = ((int)BinaryPrimitives.readShort(valBytes, off + fieldOffPos) &
0xFFFF);
+        else
+            fieldOff = BinaryPrimitives.readInt(valBytes, off + fieldOffPos);
+
+        return fieldOff;
     }
 
     /** {@inheritDoc} */
     @Override public int fieldOffset(long addr, int len) {
-        int typeId = GridUnsafe.getInt(addr + GridBinaryMarshaller.TYPE_ID_POS);
+        int typeId = BinaryPrimitives.readInt(addr, TYPE_ID_POS);
 
         if (typeId != this.typeId) {
             throw new BinaryObjectException("Failed to get field because type ID of passed
object differs" +
@@ -123,7 +168,7 @@ public class BinaryFieldImpl implements BinaryFieldEx {
                 ", actual=" + typeId + ']');
         }
 
-        int schemaId = GridUnsafe.getInt(addr + GridBinaryMarshaller.SCHEMA_ID_POS);
+        int schemaId = BinaryPrimitives.readInt(addr, SCHEMA_ID_POS);
 
         BinarySchema schema = schemas.schema(schemaId);
 
@@ -144,9 +189,9 @@ public class BinaryFieldImpl implements BinaryFieldEx {
         if (order == BinarySchema.ORDER_NOT_FOUND)
             return -1;
 
-        int schemaOff = BinaryPrimitives.readInt(addr, GridBinaryMarshaller.SCHEMA_OR_RAW_OFF_POS);
+        int schemaOff = BinaryPrimitives.readInt(addr, SCHEMA_OR_RAW_OFF_POS);
 
-        short flags = BinaryPrimitives.readShort(addr, GridBinaryMarshaller.FLAGS_POS);
+        short flags = BinaryPrimitives.readShort(addr, FLAGS_POS);
 
         int fieldIdLen = BinaryUtils.isCompactFooter(flags) ? 0 : BinaryUtils.FIELD_ID_LEN;
         int fieldOffLen = BinaryUtils.fieldOffsetLength(flags);
@@ -188,47 +233,47 @@ public class BinaryFieldImpl implements BinaryFieldEx {
             Object val;
 
             switch (hdr) {
-                case GridBinaryMarshaller.INT:
+                case INT:
                     val = buf.getInt();
 
                     break;
 
-                case GridBinaryMarshaller.LONG:
+                case LONG:
                     val = buf.getLong();
 
                     break;
 
-                case GridBinaryMarshaller.BOOLEAN:
+                case BOOLEAN:
                     val = buf.get() != 0;
 
                     break;
 
-                case GridBinaryMarshaller.SHORT:
+                case SHORT:
                     val = buf.getShort();
 
                     break;
 
-                case GridBinaryMarshaller.BYTE:
+                case BYTE:
                     val = buf.get();
 
                     break;
 
-                case GridBinaryMarshaller.CHAR:
+                case CHAR:
                     val = buf.getChar();
 
                     break;
 
-                case GridBinaryMarshaller.FLOAT:
+                case FLOAT:
                     val = buf.getFloat();
 
                     break;
 
-                case GridBinaryMarshaller.DOUBLE:
+                case DOUBLE:
                     val = buf.getDouble();
 
                     break;
 
-                case GridBinaryMarshaller.STRING: {
+                case STRING: {
                     int dataLen = buf.getInt();
 
                     byte[] data = new byte[dataLen];
@@ -240,7 +285,7 @@ public class BinaryFieldImpl implements BinaryFieldEx {
                     break;
                 }
 
-                case GridBinaryMarshaller.DATE: {
+                case DATE: {
                     long time = buf.getLong();
 
                     val = new Date(time);
@@ -248,7 +293,7 @@ public class BinaryFieldImpl implements BinaryFieldEx {
                     break;
                 }
 
-                case GridBinaryMarshaller.TIMESTAMP: {
+                case TIMESTAMP: {
                     long time = buf.getLong();
                     int nanos = buf.getInt();
 
@@ -261,7 +306,7 @@ public class BinaryFieldImpl implements BinaryFieldEx {
                     break;
                 }
 
-                case GridBinaryMarshaller.UUID: {
+                case UUID: {
                     long most = buf.getLong();
                     long least = buf.getLong();
 
@@ -270,7 +315,7 @@ public class BinaryFieldImpl implements BinaryFieldEx {
                     break;
                 }
 
-                case GridBinaryMarshaller.DECIMAL: {
+                case DECIMAL: {
                     int scale = buf.getInt();
 
                     int dataLen = buf.getInt();
@@ -292,7 +337,7 @@ public class BinaryFieldImpl implements BinaryFieldEx {
                     break;
                 }
 
-                case GridBinaryMarshaller.NULL:
+                case NULL:
                     val = null;
 
                     break;

http://git-wip-us.apache.org/repos/asf/ignite/blob/20b91e41/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
index 607dabc..51b1a96 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
@@ -292,6 +292,14 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx,
Bina
 
     /**
      * @param fieldName Field name.
+     * @return Field position or -1 if field not found.
+     */
+    public int fieldPosition(String fieldName) {
+        return findFieldByName(fieldName) ? in.position() : -1;
+    }
+
+    /**
+     * @param fieldName Field name.
      * @return Unmarshalled value.
      * @throws BinaryObjectException In case of error.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/20b91e41/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 5c40e4c..5660848 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -37,8 +37,11 @@ import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.binary.BinaryContext;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.binary.BinaryPrimitives;
+import org.apache.ignite.internal.binary.BinaryReaderExImpl;
 import org.apache.ignite.internal.binary.BinaryUtils;
 import org.apache.ignite.internal.binary.GridBinaryMarshaller;
+import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream;
 import org.apache.ignite.internal.binary.streams.BinaryOffheapInputStream;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
@@ -1891,7 +1894,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         }
 
         /** {@inheritDoc} */
-        @Override public int propertyOffset(CacheObject key, CacheObject val) throws IgniteCheckedException
{
+        @Override public int propertyOffset(CacheObject key, CacheObject val, CacheObjectContext
ctx) throws IgniteCheckedException {
             throw new UnsupportedOperationException();
         }
 
@@ -2017,6 +2020,9 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Override public boolean keyProperty() {
+            if (parent != null)
+                return parent.keyProperty();
+
             int isKeyProp0 = isKeyProp;
 
             assert isKeyProp0 != 0;
@@ -2025,76 +2031,132 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         }
 
         /** {@inheritDoc} */
-        @Override public int propertyOffset(CacheObject key, CacheObject val) throws IgniteCheckedException
{
-            if (parent != null)
-                return parent.propertyOffset(key, val);
+        @Override public int propertyOffset(CacheObject key, CacheObject val, CacheObjectContext
ctx) throws IgniteCheckedException {
+            boolean keyProp;
 
-            if (binaryCtx == null)
-                throw new UnsupportedOperationException("BinaryObjects are not enabled.");
+            byte[] objBytes;
 
-            Object obj;
+            int off = 0;
 
-            int isKeyProp0 = isKeyProp;
+            if (parent != null) {
+                off = parent.propertyOffset(key, val, ctx);
 
-            if (isKeyProp0 == 0) {
-                // Key is allowed to be a non-binary object here.
-                // We check key before value consistently with ClassProperty.
-                if (key instanceof BinaryObject && ((BinaryObject)key).hasField(propName))
-                    isKeyProp = isKeyProp0 = 1;
-                else if (val instanceof BinaryObject && ((BinaryObject)val).hasField(propName))
-                    isKeyProp = isKeyProp0 = -1;
-                else {
-                    U.warn(log, "Neither key nor value have property " +
-                        "[propName=" + propName + ", key=" + key + ", val=" + val + "]");
+                if (off == -1)
+                    return off;
 
-                    return -1;
+                keyProp = parent.keyProperty();
+
+                if (keyProp)
+                    objBytes = key.valueBytes(ctx);
+                else
+                    objBytes = val.valueBytes(ctx);
+            }
+            else {
+                if (binaryCtx == null)
+                    throw new UnsupportedOperationException("BinaryObjects are not enabled.");
+
+                int isKeyProp0 = isKeyProp;
+
+                if (isKeyProp0 == 0) {
+                    if (key instanceof BinaryObject && ((BinaryObject)key).hasField(propName))
+                        isKeyProp = isKeyProp0 = 1;
+                    else if (val instanceof BinaryObject && ((BinaryObject)val).hasField(propName))
+                        isKeyProp = isKeyProp0 = -1;
+                    else {
+                        U.warn(log, "Neither key nor value have property " +
+                            "[propName=" + propName + ", key=" + key + ", val=" + val + "]");
+
+                        return -1;
+                    }
                 }
+
+                keyProp = isKeyProp0 == 1;
+
+                Object obj = keyProp ? key : val;
+
+                assert obj instanceof BinaryObject : obj;
+
+                CacheObject obj0 = (CacheObject)obj;
+
+                objBytes = obj0.valueBytes(ctx);
             }
 
-            obj = isKeyProp0 == 1 ? key : val;
+            byte type = BinaryPrimitives.readByte(objBytes, off);
 
-            assert obj instanceof BinaryObject : obj;
+            if (type != GridBinaryMarshaller.OBJ) {
+                if (type == GridBinaryMarshaller.NULL)
+                    return -1;
 
-            BinaryObject obj0 = (BinaryObject)obj;
+                throw new IgniteCheckedException("Non-binary object received as a result
of property extraction " +
+                    "[parent=" + parent + ", propName=" + propName + ", type=" + type + ']');
+            }
 
-            BinaryField field = binaryField(obj0);
+            BinaryField field = binaryField(objBytes, off);
 
-            if (field != null)
-                return field.fieldOffset(obj0);
+            if (field != null) {
+                int off0 = field.fieldOffset(objBytes, off);
+
+                return off0 < 0 ? off0 : off0 + off;
+            }
 
-            // TODO: try to get address from object.
+            BinaryReaderExImpl reader = new BinaryReaderExImpl(binaryCtx,
+                BinaryHeapInputStream.create(objBytes, off),
+                null);
 
-            return -1;
+            return reader.fieldPosition(propName);
         }
 
         /** {@inheritDoc} */
         @Override public int propertyOffset(long keyAddr, int keyLen, long valAddr, int valLen)
throws IgniteCheckedException {
-            if (parent != null)
-                return parent.propertyOffset(keyAddr, keyLen, valAddr, valLen);
+            boolean keyProp;
 
-            if (binaryCtx == null)
-                throw new UnsupportedOperationException("BinaryObjects are not enabled.");
+            int off = 0;
 
-            int isKeyProp0 = isKeyProp;
+            if (parent != null) {
+                off = parent.propertyOffset(keyAddr, keyLen, valAddr, valLen);
+
+                if (off == -1)
+                    return off;
+
+                keyProp = parent.keyProperty();
 
-            if (isKeyProp0 == 0) {
-                // Key is allowed to be a non-binary object here.
-                // We check key before value consistently with ClassProperty.
-                if (hasField(keyAddr, keyLen, propName))
-                    isKeyProp = isKeyProp0 = 1;
-                else if (hasField(valAddr, valLen, propName))
-                    isKeyProp = isKeyProp0 = -1;
+                if (keyProp) {
+                    keyAddr += off;
+                    keyLen -= off;
+                }
                 else {
-                    U.warn(log, "Neither key nor value have property [propName=" + propName
+ "]");
+                    valAddr += off;
+                    valLen -= off;
+                }
+            }
+            else {
+                if (binaryCtx == null)
+                    throw new UnsupportedOperationException("BinaryObjects are not enabled.");
 
-                    return -1;
+                int isKeyProp0 = isKeyProp;
+
+                if (isKeyProp0 == 0) {
+                    // Key is allowed to be a non-binary object here.
+                    // We check key before value consistently with ClassProperty.
+                    if (hasField(keyAddr, keyLen, propName))
+                        isKeyProp = isKeyProp0 = 1;
+                    else if (hasField(valAddr, valLen, propName))
+                        isKeyProp = isKeyProp0 = -1;
+                    else {
+                        U.warn(log, "Neither key nor value have property [propName=" + propName
+ "]");
+
+                        return -1;
+                    }
                 }
+
+                keyProp = isKeyProp0 == 1;
             }
 
+
             long addr;
             int len;
 
-            if (isKeyProp0 == 1) {
+            if (keyProp) {
                 addr = keyAddr;
                 len = keyLen;
             }
@@ -2103,14 +2165,31 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                 len = valLen;
             }
 
+            byte type = GridUnsafe.getByte(addr);
+
+            if (type != GridBinaryMarshaller.OBJ) {
+                if (type == GridBinaryMarshaller.NULL)
+                    return -1;
+
+                throw new IgniteCheckedException("Non-binary object received as a result
of property extraction " +
+                    "[parent=" + parent + ", propName=" + propName + ", type=" + type + ']');
+            }
+
             BinaryField field = binaryField(addr);
 
-            if (field != null)
-                return field.fieldOffset(addr, len);
+            if (field != null) {
+                int off0 = field.fieldOffset(addr, len);
+
+                return off0 < 0 ? off0 : off0 + off;
+            }
 
-            // TODO: try to get offset from object.
+            BinaryReaderExImpl reader = new BinaryReaderExImpl(binaryCtx,
+                new BinaryOffheapInputStream(addr, len),
+                null);
 
-            return -1;
+            int pos = reader.fieldPosition(propName);
+
+            return pos < 0 ? pos : off + pos;
         }
 
         /**
@@ -2123,7 +2202,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         private boolean hasField(long addr, int len, String fieldName) throws IgniteCheckedException
{
             byte type = GridUnsafe.getByte(addr);
 
-            if (type != GridBinaryMarshaller.BINARY_OBJ)
+            if (type != GridBinaryMarshaller.OBJ)
                 return false;
 
             BinaryOffheapInputStream in = new BinaryOffheapInputStream(addr, len);
@@ -2178,6 +2257,33 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         }
 
         /**
+         * @param val Marshalled value.
+         * @param off Value offset.
+         * @return Binary field.
+         */
+        private BinaryField binaryField(byte[] val, int off) {
+            BinaryField field0 = field;
+
+            if (field0 == null && !fieldTaken) {
+                int typeId = BinaryPrimitives.readInt(val, off + GridBinaryMarshaller.TYPE_ID_POS);
+
+                BinaryType type = binaryCtx.metadata(typeId);
+
+                if (type != null) {
+                    field0 = type.field(propName);
+
+                    assert field0 != null;
+
+                    field = field0;
+                }
+
+                fieldTaken = true;
+            }
+
+            return field0;
+        }
+
+        /**
          * Get binary field for the property.
          *
          * @param addr Marshalled object address.
@@ -2187,7 +2293,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             BinaryField field0 = field;
 
             if (field0 == null && !fieldTaken) {
-                int typeId = GridUnsafe.getInt(addr + GridBinaryMarshaller.TYPE_ID_POS);
+                int typeId = BinaryPrimitives.readInt(addr, GridBinaryMarshaller.TYPE_ID_POS);
 
                 BinaryType type = binaryCtx.metadata(typeId);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/20b91e41/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProperty.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProperty.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProperty.java
index 0accb5d..09b3150 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProperty.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProperty.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.query;
 
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 
 /**
  * Description and access method for query entity field.
@@ -57,10 +58,11 @@ public abstract class GridQueryProperty {
     /**
      * @param key Key.
      * @param val Value.
+     * @param ctx Context.
      * @return Property offset or -1 if property not found.
      * @throws IgniteCheckedException If failed.
      */
-    public abstract int propertyOffset(CacheObject key, CacheObject val) throws IgniteCheckedException;
+    public abstract int propertyOffset(CacheObject key, CacheObject val, CacheObjectContext
ctx) throws IgniteCheckedException;
 
     /**
      * @return {@code True} if property belongs to cache key.

http://git-wip-us.apache.org/repos/asf/ignite/blob/20b91e41/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
index f014f54..e4ac97d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
@@ -526,7 +526,7 @@ public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstract
                     throw new UnsupportedOperationException();
                 }
 
-                @Override public int propertyOffset(CacheObject key, CacheObject val) throws
IgniteCheckedException {
+                @Override public int propertyOffset(CacheObject key, CacheObject val, CacheObjectContext
ctx) throws IgniteCheckedException {
                     throw new UnsupportedOperationException();
                 }
 


Mime
View raw message