alex-plekhanov commented on code in PR #12903:
URL: https://github.com/apache/ignite/pull/12903#discussion_r2964244538


##########
docs/_docs/SQL/JDBC/jdbc-driver.adoc:
##########
@@ -173,6 +177,79 @@ The example below shows how to pass three addresses via 
the connection string:
 include::{javaFile}[tags=multiple-endpoints, indent=0]
 ----
 
+=== Keep Binary [[keep-binary]]
+
+Keep binary parameter is required for operations with custom objects involved.

Review Comment:
   The `keepBinary` parameter is required for operations involving fields that 
contain complex objects. In case this flag is set to `true` such fields are not 
deserialized upon return to the user, instead being retained in their binary 
object format.



##########
docs/_docs/SQL/JDBC/jdbc-driver.adoc:
##########
@@ -173,6 +177,79 @@ The example below shows how to pass three addresses via 
the connection string:
 include::{javaFile}[tags=multiple-endpoints, indent=0]
 ----
 
+=== Keep Binary [[keep-binary]]
+
+Keep binary parameter is required for operations with custom objects involved.
+
+[source, java]
+----
+// Suppose custom object looks like as follows:
+class TestObject implements Serializable {
+    @QuerySqlField
+    int id;
+
+    @QuerySqlField
+    TestObjectField objVal;
+
+    TestObject(int id) {
+        this.id = id;
+    }
+}
+
+// And appropriate inner class:
+class TestObjectField implements Serializable {

Review Comment:
   Maybe `TestInnerObject`?



##########
docs/_docs/SQL/JDBC/jdbc-driver.adoc:
##########
@@ -173,6 +177,79 @@ The example below shows how to pass three addresses via 
the connection string:
 include::{javaFile}[tags=multiple-endpoints, indent=0]
 ----
 
+=== Keep Binary [[keep-binary]]
+
+Keep binary parameter is required for operations with custom objects involved.
+
+[source, java]
+----
+// Suppose custom object looks like as follows:
+class TestObject implements Serializable {
+    @QuerySqlField
+    int id;
+
+    @QuerySqlField
+    TestObjectField objVal;
+
+    TestObject(int id) {
+        this.id = id;
+    }
+}
+
+// And appropriate inner class:
+class TestObjectField implements Serializable {
+    int intFld;
+
+    String strFld;
+
+    TestObjectField(int intFld, String strFld) {
+        this.intFld = intFld;
+        this.strFld = strFld;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (o == null || getClass() != o.getClass())
+            return false;
+
+        TestObjectField that = (TestObjectField)o;
+        return intFld == that.intFld && !(strFld != null ? 
!strFld.equals(that.strFld) : that.strFld != null);
+    }
+
+    @Override
+    public int hashCode() {
+        int res = intFld;
+        res = 31 * res + (strFld != null ? strFld.hashCode() : 0);
+        return res;
+    }

Review Comment:
   Binary objects are compared using byte[] representation of objects. 
Implementation of these methods can confuse users and make them suppose that 
these methods are used for binary objects comparison.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to