alex-plekhanov commented on code in PR #13241:
URL: https://github.com/apache/ignite/pull/13241#discussion_r3428348128
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/KeepBinaryIntegrationTest.java:
##########
@@ -156,6 +156,53 @@ public void testDynamicParameters() {
txAction(client, checker);
}
+ /** */
+ @Test
+ public void testDmlWithCompositePk() {
+ IgniteCache<Object, Object> cache =
client.createCache(cacheConfiguration().setName("testInsert"));
+
+ if (sqlTxMode != SqlTransactionMode.NONE && tx == null)
+ startTransaction(client);
+
+ SupplierX<?> checker = () -> {
+ runQuery(0, nodeCount() * 10, cache);
+
+ IgniteCache<Object, Object> cacheBin = cache.withKeepBinary();
+
+ runQuery(nodeCount() * 10, 2 * nodeCount() * 10, cacheBin);
+
+ List<List<?>> res = cacheBin.query(new SqlFieldsQuery("SELECT *
FROM emp")).getAll();
+
+ assertEquals("Unexpected result set size: " + res.size(), 1,
res.size());
+
+ return null;
+ };
+
+ if (sqlTxMode == SqlTransactionMode.NONE)
+ checker.get();
+ else
+ txAction(client, checker);
+ }
+
+ /** */
+ private void runQuery(int begin, int end, IgniteCache<?, ?> cache) {
Review Comment:
`runQuery` sounds like it executes only one select query. Maybe something
like `checkDml`?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java:
##########
@@ -64,6 +64,9 @@ public class CacheOperationContext implements Serializable {
/** Application attributes. */
private final Map<String, String> appAttrs;
+ /** Handle binary in interceptor operation flag. */
+ private final boolean handleBinaryInInterceptor;
Review Comment:
Maybe it's better to implement it with default value == keepBinary (when
handleBinaryInInterceptor is not explicetly set)? For example, now I see only
one place where this flag is set to true when keepBinary is set to true, but
there are other places in code, where keepBinary flag changes. In other places
maybe it's worth to set handleBinaryInInterceptor to true too.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java:
##########
@@ -1352,7 +1355,7 @@ private IgniteInternalFuture removeAllAsync0(
Collection<GridCacheVersion> drVers = null;
- if (opCtx != null && keys != null && opCtx.hasDataCenterId()) {
+ if (opCtx != null && keys != null && opCtx.dataCenterId() != null) {
Review Comment:
Redundant change
--
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]