rezataroosheh commented on code in PR #13770:
URL: https://github.com/apache/ignite/pull/13770#discussion_r4441449509
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java:
##########
@@ -1734,16 +1735,22 @@ private CacheContinuousQueryEntry
transformToEntry(IgniteClosure<CacheEntryEvent
oldVal = null;
}
+ // The transformer result is not a cache value, so the keep binary
flag of the cache does not apply to it.
+ // Keep it binary only if the transformer returned a BinaryObject, as
on the local node.
+ boolean keepBinary = transVal instanceof BinaryObject;
Review Comment:
Thanks for looking at it.
A transformer can return a user class (for example, `PersonId`) or a
`BinaryObject`. Both are sent to the listener node as `BinaryObjectImpl`, so
the listener node can't tell them apart. Only the node that runs the
transformer can, which is why the check is there.
We could remove the check and always deserialize the result on the listener
node. Then the listener would get:
- If the transformer returns `PersonId`: `PersonId` for both local and
remote events.
- If the transformer returns a `BinaryObject`: a `BinaryObject` for local
events, but `PersonId` for remote events. That would be wrong, because the
listener expects a `BinaryObject`.
Could you please explain what you mean by "flag usage"? Which flag do you
have in mind?
--
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]