skorotkov commented on code in PR #11518:
URL: https://github.com/apache/ignite/pull/11518#discussion_r1830734841
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerUtils.java:
##########
@@ -246,12 +274,61 @@ else if (cls == Timestamp[].class)
writer.writeTimestampArray((Timestamp[])obj);
else if (cls == java.util.Date[].class || cls == java.sql.Date[].class)
writer.writeDateArray((java.util.Date[])obj);
+ else if (obj instanceof SqlInputStreamWrapper)
+ writeInputStreamAsByteArray(writer, (SqlInputStreamWrapper)obj);
+ else if (obj instanceof Blob)
+ writeBlobAsByteArray(writer, (Blob)obj);
else if (binObjAllow)
writer.writeObjectDetached(obj);
else
throw new BinaryObjectException("Custom objects are not
supported");
}
+ /**
+ * Write byte array from the InputStream enclosed in the stream wrapper.
+ *
+ * @param writer Writer.
+ * @param wrapper stream wrapper
+ */
+ private static void writeInputStreamAsByteArray(BinaryWriterExImpl writer,
SqlInputStreamWrapper wrapper)
+ throws BinaryObjectException {
+ InputStream in = wrapper.getInputStream();
+ Integer len = wrapper.getLength();
+
+ if (len == null)
+ writer.writeByteArrayFromInputStream(in);
Review Comment:
`writeByteArray` already exists, so will change to `writeInputStream`
--
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]