[PR] IGNITE-21943: Cover SQL F561(Full value expressions) feature by tests [ignite-3]

2024-04-19 Thread via GitHub


lowka opened a new pull request, #3641:
URL: https://github.com/apache/ignite-3/pull/3641

   Adds some tests related to full row expression support (row data type).
   
   https://issues.apache.org/jira/browse/IGNITE-22084
   
   ---
   
   Thank you for submitting the pull request.
   
   To streamline the review process of the patch and ensure better code quality
   we ask both an author and a reviewer to verify the following:
   
   ### The Review Checklist
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. 
Also make sure to complete the following:  
   \- There is a single JIRA ticket related to the pull request.  
   \- The web-link to the pull request is attached to the JIRA ticket.  
   \- The JIRA ticket has the Patch Available state.  
   \- The description of the JIRA ticket explains WHAT was made, WHY and HOW.  
   \- The pull request title is treated as the final commit message. The 
following pattern must be used: IGNITE- Change summary where  - number 
of JIRA issue.
   - [ ] **Design:** new code conforms with the design principles of the 
components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size 
must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer 
documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, 
happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding 
Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] we need go client sdk [ignite]

2024-04-19 Thread via GitHub


Linuxlovers commented on issue #11313:
URL: https://github.com/apache/ignite/issues/11313#issuecomment-2066043299

   So, after removing the transaction, are there any other usage scenarios for 
this in memory database?


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


rpuch commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572079536


##
modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/recovery/DisasterRecoveryApi.java:
##
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.api.recovery;
+
+import io.micronaut.http.annotation.Controller;
+import io.micronaut.http.annotation.Get;
+import io.micronaut.http.annotation.PathVariable;
+import io.micronaut.http.annotation.Produces;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.internal.rest.api.Problem;
+import org.apache.ignite.internal.rest.constants.MediaType;
+
+/**
+ * Disaster recovery controller.
+ */
+@Controller("/management/v1/recovery")
+@Tag(name = "recovery")
+public interface DisasterRecoveryApi {
+@Get("state/local")
+@Operation(operationId = "getLocalPartitionStates", description = "Returns 
local partition states.")
+@ApiResponse(responseCode = "200", description = "Partition states 
returned.")
+@ApiResponse(responseCode = "500", description = "Internal error.",
+content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
+@Produces(MediaType.APPLICATION_JSON)
+CompletableFuture getLocalPartitionStates();
+
+@Get("state/local/{zoneName}")
+@Operation(operationId = "getLocalPartitionStatesByZone", description = 
"Returns local partition states.")
+@ApiResponse(responseCode = "200", description = "Partition states 
returned.")
+@ApiResponse(responseCode = "500", description = "Internal error.",
+content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
+@ApiResponse(responseCode = "400", description = "Zone is not found.",

Review Comment:
   Ahem... then we probably need to make sure it's correct for configuration 
managers



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


rpuch commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572082418


##
modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/recovery/ItDisasterRecoveryControllerTest.java:
##
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.recovery;
+
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.IntStream.range;
+import static 
org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
+import static 
org.apache.ignite.internal.catalog.commands.CatalogUtils.DEFAULT_PARTITION_COUNT;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import io.micronaut.http.HttpResponse;
+import io.micronaut.http.HttpStatus;
+import io.micronaut.http.client.HttpClient;
+import io.micronaut.http.client.annotation.Client;
+import io.micronaut.http.client.exceptions.HttpClientResponseException;
+import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
+import jakarta.inject.Inject;
+import java.util.List;
+import org.apache.ignite.internal.Cluster;
+import org.apache.ignite.internal.ClusterPerTestIntegrationTest;
+import 
org.apache.ignite.internal.rest.api.recovery.GlobalPartitionStateResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.GlobalPartitionStatesResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.LocalPartitionStateResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.LocalPartitionStatesResponse;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test for disaster recovery REST commands.
+ */
+@MicronautTest
+public class ItDisasterRecoveryControllerTest extends 
ClusterPerTestIntegrationTest {
+private static final String NODE_URL = "http://localhost:; + 
Cluster.BASE_HTTP_PORT;
+
+@Inject
+@Client(NODE_URL + "/management/v1/recovery/")
+HttpClient client;
+
+@Override
+protected int initialNodes() {
+return 1;
+}
+
+@Test
+void testLocalPartitionStates() {
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT)");
+var response = client.toBlocking().exchange("/state/local/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+
+LocalPartitionStatesResponse body = response.body();
+assertEquals(DEFAULT_PARTITION_COUNT, body.states().size());
+
+List partitionIds = 
body.states().stream().map(LocalPartitionStateResponse::partitionId).collect(toList());
+assertEquals(range(0, 
DEFAULT_PARTITION_COUNT).boxed().collect(toList()), partitionIds);
+}
+
+@Test
+void testLocalPartitionStatesByZoneMissingZone() {
+HttpClientResponseException thrown = assertThrows(
+HttpClientResponseException.class,
+() -> client.toBlocking().exchange("/state/local/foo/", 
LocalPartitionStatesResponse.class)
+);
+
+assertEquals(HttpStatus.BAD_REQUEST, thrown.getResponse().status());
+}
+
+@Test
+void testLocalPartitionStatesByZone() {
+executeSql("CREATE TABLE def (id INT PRIMARY KEY, val INT)");
+
+executeSql("CREATE ZONE foo WITH partitions=1, storage_profiles='" + 
DEFAULT_AIPERSIST_PROFILE_NAME + "'");
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT) WITH 
PRIMARY_ZONE = 'FOO'");
+
+var response = client.toBlocking().exchange("/state/local/Default/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+assertEquals(DEFAULT_PARTITION_COUNT, response.body().states().size());
+
+response = client.toBlocking().exchange("/state/local/FOO/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+assertEquals(1, response.body().states().size());
+}
+
+@Test
+void testLocalPartitionStatesByZoneJson() {
+executeSql("CREATE ZONE foo WITH partitions=1, storage_profiles='" + 
DEFAULT_AIPERSIST_PROFILE_NAME + "'");
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT) WITH 
PRIMARY_ZONE = 

Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


rpuch commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572081388


##
modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/recovery/GlobalPartitionStateResponse.java:
##
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.api.recovery;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonGetter;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+/**
+ * Global partition state schema class.
+ */
+@Schema(description = "Information about global partition state.")
+public class GlobalPartitionStateResponse {
+private final int partitionId;
+private final String tableName;
+private final String state;

Review Comment:
   I think it's ok to leave strings here as this class is just a DTO and should 
never be used in any 'logic'



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571914234


##
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/JoinColocationPlannerTest.java:
##
@@ -70,10 +78,105 @@ public void joinSameTableSimpleAff() throws Exception {
 }
 
 /**
- * Join of the same tables with a complex affinity is expected to be 
colocated.
+ * Join of the same tables with a simple affinity is expected to be 
colocated.
+ */
+@Test
+public void joinSameTableSimpleAffHashJoin() throws Exception {
+IgniteTable tbl = simpleTable("TEST_TBL", DEFAULT_TBL_SIZE);
+
+IgniteSchema schema = createSchema(tbl);
+
+String sql = "select count(*) "
++ "from TEST_TBL t1 "
++ "join TEST_TBL t2 on t1.id = t2.id";
+
+// Only hash join
+RelNode phys = physicalPlan(sql, schema, "NestedLoopJoinConverter", 
"CorrelatedNestedLoopJoin", "MergeJoinConverter");
+
+AbstractIgniteJoin join = findFirstNode(phys, 
byClass(AbstractIgniteJoin.class));
+List joinNodes = findNodes(phys, 
byClass(AbstractIgniteJoin.class));
+
+String invalidPlanMsg = "Invalid plan:\n" + RelOptUtil.toString(phys);
+
+assertThat(invalidPlanMsg, joinNodes.size(), equalTo(1));
+assertThat(invalidPlanMsg, join, notNullValue());
+assertThat(invalidPlanMsg, join.distribution().function().affinity(), 
is(true));
+}
+
+/**
+ * Hash join need to preserve left collation.
  */
 @Test
-public void joinSameTableComplexAff() throws Exception {
+public void hashJoinCheckLeftCollationsPropagation() throws Exception {
+IgniteTable tbl1 = simpleTable("TEST_TBL", DEFAULT_TBL_SIZE);
+IgniteTable tbl2 = complexTbl("TEST_TBL_CMPLX");
+
+IgniteSchema schema = createSchema(tbl1, tbl2);
+
+String sql = "select t1.ID, t2.ID1 "
++ "from TEST_TBL_CMPLX t2 "
++ "join TEST_TBL t1 on t1.id = t2.id1 "
++ "order by t2.ID1 NULLS LAST, t2.ID2 NULLS LAST";
+
+// Only hash join
+RelNode phys = physicalPlan(sql, schema, "NestedLoopJoinConverter",
+"CorrelatedNestedLoopJoin", "MergeJoinConverter", 
"JoinCommuteRule");
+
+AbstractIgniteJoin join = findFirstNode(phys, 
byClass(AbstractIgniteJoin.class));
+List joinNodes = findNodes(phys, 
byClass(AbstractIgniteJoin.class));
+List sortNodes = findNodes(phys, byClass(IgniteSort.class));
+
+String invalidPlanMsg = "Invalid plan:\n" + RelOptUtil.toString(phys);
+
+assertThat(invalidPlanMsg, sortNodes.size(), equalTo(0));
+assertThat(invalidPlanMsg, joinNodes.size(), equalTo(1));
+assertThat(invalidPlanMsg, join, notNullValue());
+}
+
+/**
+ * Hash join erase right collation.
+ */
+@Test
+public void hashJoinCheckRightCollations() throws Exception {

Review Comment:
   done



##
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/JoinColocationPlannerTest.java:
##
@@ -70,10 +78,105 @@ public void joinSameTableSimpleAff() throws Exception {
 }
 
 /**
- * Join of the same tables with a complex affinity is expected to be 
colocated.
+ * Join of the same tables with a simple affinity is expected to be 
colocated.
+ */
+@Test
+public void joinSameTableSimpleAffHashJoin() throws Exception {
+IgniteTable tbl = simpleTable("TEST_TBL", DEFAULT_TBL_SIZE);
+
+IgniteSchema schema = createSchema(tbl);
+
+String sql = "select count(*) "
++ "from TEST_TBL t1 "
++ "join TEST_TBL t2 on t1.id = t2.id";
+
+// Only hash join
+RelNode phys = physicalPlan(sql, schema, "NestedLoopJoinConverter", 
"CorrelatedNestedLoopJoin", "MergeJoinConverter");
+
+AbstractIgniteJoin join = findFirstNode(phys, 
byClass(AbstractIgniteJoin.class));
+List joinNodes = findNodes(phys, 
byClass(AbstractIgniteJoin.class));
+
+String invalidPlanMsg = "Invalid plan:\n" + RelOptUtil.toString(phys);
+
+assertThat(invalidPlanMsg, joinNodes.size(), equalTo(1));
+assertThat(invalidPlanMsg, join, notNullValue());
+assertThat(invalidPlanMsg, join.distribution().function().affinity(), 
is(true));
+}
+
+/**
+ * Hash join need to preserve left collation.
  */
 @Test
-public void joinSameTableComplexAff() throws Exception {
+public void hashJoinCheckLeftCollationsPropagation() throws Exception {

Review Comment:
   done



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22069 Optimize entries expiration [ignite]

2024-04-19 Thread via GitHub


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


##
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java:
##
@@ -1108,7 +1110,30 @@ private Metas getOrAllocateCacheMetas() throws 
IgniteCheckedException {
 try {
 int cleared = 0;
 
-for (CacheDataStore store : cacheDataStores()) {
+Iterable cacheDataStores = cacheDataStores();
+
+// Use random shift to reduce contention.
+int shift = 
ThreadLocalRandom.current().nextInt(F.size(cacheDataStores.iterator()));
+
+int cnt = 0;
+for (CacheDataStore store : cacheDataStores) {

Review Comment:
   Thanks, fixed



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22026 Fix incorrect retry logic in GridCacheIoManager send method [ignite]

2024-04-19 Thread via GitHub


timoninmaxim merged PR #11311:
URL: https://github.com/apache/ignite/pull/11311


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22069 Optimize entries expiration [ignite]

2024-04-19 Thread via GitHub


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


##
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java:
##
@@ -57,7 +57,8 @@
 
 IgniteCacheExpireWhileRebalanceTest.class,
 
-ExpiryPolicyInfoLoggingTest.class
+ExpiryPolicyInfoLoggingTest.class,

Review Comment:
   Parameter added to the test



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-18991 Move stable/planned/pending assignments from table to distribution zone root keys [ignite-3]

2024-04-19 Thread via GitHub


alievmirza commented on code in PR #3422:
URL: https://github.com/apache/ignite-3/pull/3422#discussion_r1571989887


##
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/LeaseTracker.java:
##
@@ -99,6 +109,8 @@ public class LeaseTracker extends 
AbstractEventProducer 
tablePartIdToZoneIdProvider;

Review Comment:
   Lets add todo with the removal of this



##
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##
@@ -105,6 +110,8 @@ public class LeaseUpdater {
 /** Cluster clock. */
 private final ClockService clockService;
 
+private final Function groupIdProvider;

Review Comment:
   Lets add todo with the removal of this  



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


rpuch commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572079960


##
modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/recovery/DisasterRecoveryApi.java:
##
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.api.recovery;
+
+import io.micronaut.http.annotation.Controller;
+import io.micronaut.http.annotation.Get;
+import io.micronaut.http.annotation.PathVariable;
+import io.micronaut.http.annotation.Produces;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.internal.rest.api.Problem;
+import org.apache.ignite.internal.rest.constants.MediaType;
+
+/**
+ * Disaster recovery controller.
+ */
+@Controller("/management/v1/recovery")
+@Tag(name = "recovery")
+public interface DisasterRecoveryApi {
+@Get("state/local")
+@Operation(operationId = "getLocalPartitionStates", description = "Returns 
local partition states.")
+@ApiResponse(responseCode = "200", description = "Partition states 
returned.")
+@ApiResponse(responseCode = "500", description = "Internal error.",
+content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
+@Produces(MediaType.APPLICATION_JSON)
+CompletableFuture getLocalPartitionStates();
+
+@Get("state/local/{zoneName}")
+@Operation(operationId = "getLocalPartitionStatesByZone", description = 
"Returns local partition states.")
+@ApiResponse(responseCode = "200", description = "Partition states 
returned.")
+@ApiResponse(responseCode = "500", description = "Internal error.",
+content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
+@ApiResponse(responseCode = "400", description = "Zone is not found.",

Review Comment:
   I see this in `ClusterConfigurationApi`:
   
   ```
   @ApiResponse(responseCode = "400", description = "Incorrect 
configuration.",
   content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
   @ApiResponse(responseCode = "404", description = "Configuration not 
found. Most likely, the cluster is not initialized.",
   content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
   ```



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


rpuch commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572113222


##
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java:
##
@@ -357,36 +402,94 @@ private static LocalPartitionStateEnum convertState(State 
nodeState) {
 
 default:
 // Unrecognized state, better safe than sorry.
-return LocalPartitionStateEnum.BROKEN;
+return BROKEN;
 }
 }
 
 /**
  * Replaces some healthy states with a {@link 
LocalPartitionStateEnum#CATCHING_UP},it can only be done once the state of all 
peers is
  * known.
  */
-private Map> normalize(
-Map> result
+private static Map> 
normalizeLocal(
+Map> 
result,
+Catalog catalog
 ) {
 return 
result.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, entry -> 
{
-Map map = entry.getValue();
+TablePartitionId tablePartitionId = entry.getKey();
+Map map = entry.getValue();
 
 // noinspection OptionalGetWithoutIsPresent
-long maxLogIndex = 
map.values().stream().mapToLong(LocalPartitionState::logIndex).max().getAsLong();
+long maxLogIndex = 
map.values().stream().mapToLong(LocalPartitionStateMessage::logIndex).max().getAsLong();
 
 return 
map.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, entry2 -> {
-LocalPartitionState state = entry2.getValue();
+LocalPartitionStateMessage stateMsg = entry2.getValue();
 
-if (state.state() != LocalPartitionStateEnum.HEALTHY || 
maxLogIndex - state.logIndex() < CATCH_UP_THRESHOLD) {
-return state;
+LocalPartitionStateEnum stateEnum = stateMsg.state();
+
+if (stateMsg.state() == HEALTHY && maxLogIndex - 
stateMsg.logIndex() >= CATCH_UP_THRESHOLD) {
+stateEnum = CATCHING_UP;
 }
 
-return MSG_FACTORY.localPartitionState()
-.state(LocalPartitionStateEnum.CATCHING_UP)
-.partitionId(state.partitionId())
-.logIndex(state.logIndex())
-.build();
+CatalogTableDescriptor tableDescriptor = 
catalog.table(tablePartitionId.tableId());
+return new LocalPartitionState(tableDescriptor.name(), 
tablePartitionId.partitionId(), stateEnum);
 }));
 }));
 }
+
+private static Map normalizeGlobal(
+Map> 
localResult,
+Catalog catalog
+) {
+Map tableIdToPartitions = new HashMap<>();
+
+Map result = 
localResult.entrySet().stream()
+.collect(Collectors.toMap(Map.Entry::getKey, entry -> {
+TablePartitionId tablePartitionId = entry.getKey();
+Map map = entry.getValue();
+
+int zoneId = 
catalog.table(tablePartitionId.tableId()).zoneId();

Review Comment:
   Yes, the code seems to be correct, but it's not too obvious. Could you 
please add some comments on this in the code? Otherwise it will be easy to 
break it in the future.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] we need go client sdk [ignite]

2024-04-19 Thread via GitHub


ptupitsyn commented on issue #11313:
URL: https://github.com/apache/ignite/issues/11313#issuecomment-2066093824

   > are there any other usage scenarios for this in memory database?
   
   1. It is not only in-memory, you can enable persistence or use third-party 
storage
   2. All other use cases are available, such as SQL, caching, Compute
   3. There is also a [RESTful 
API](https://ignite.apache.org/docs/latest/restapi#execute-a-task)
   4. Finally, if something is missing in the Go SDK or RESTful API, you can 
always implement it as a Java compute task and call that from Go or any other 
language. Consider Java as our DSL.


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


rpuch commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572086692


##
modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/recovery/ItDisasterRecoveryControllerTest.java:
##
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.recovery;
+
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.IntStream.range;
+import static 
org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
+import static 
org.apache.ignite.internal.catalog.commands.CatalogUtils.DEFAULT_PARTITION_COUNT;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import io.micronaut.http.HttpResponse;
+import io.micronaut.http.HttpStatus;
+import io.micronaut.http.client.HttpClient;
+import io.micronaut.http.client.annotation.Client;
+import io.micronaut.http.client.exceptions.HttpClientResponseException;
+import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
+import jakarta.inject.Inject;
+import java.util.List;
+import org.apache.ignite.internal.Cluster;
+import org.apache.ignite.internal.ClusterPerTestIntegrationTest;
+import 
org.apache.ignite.internal.rest.api.recovery.GlobalPartitionStateResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.GlobalPartitionStatesResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.LocalPartitionStateResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.LocalPartitionStatesResponse;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test for disaster recovery REST commands.
+ */
+@MicronautTest
+public class ItDisasterRecoveryControllerTest extends 
ClusterPerTestIntegrationTest {
+private static final String NODE_URL = "http://localhost:; + 
Cluster.BASE_HTTP_PORT;
+
+@Inject
+@Client(NODE_URL + "/management/v1/recovery/")
+HttpClient client;
+
+@Override
+protected int initialNodes() {
+return 1;
+}
+
+@Test
+void testLocalPartitionStates() {
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT)");
+var response = client.toBlocking().exchange("/state/local/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+
+LocalPartitionStatesResponse body = response.body();
+assertEquals(DEFAULT_PARTITION_COUNT, body.states().size());
+
+List partitionIds = 
body.states().stream().map(LocalPartitionStateResponse::partitionId).collect(toList());
+assertEquals(range(0, 
DEFAULT_PARTITION_COUNT).boxed().collect(toList()), partitionIds);
+}
+
+@Test
+void testLocalPartitionStatesByZoneMissingZone() {
+HttpClientResponseException thrown = assertThrows(
+HttpClientResponseException.class,
+() -> client.toBlocking().exchange("/state/local/foo/", 
LocalPartitionStatesResponse.class)
+);
+
+assertEquals(HttpStatus.BAD_REQUEST, thrown.getResponse().status());
+}
+
+@Test
+void testLocalPartitionStatesByZone() {
+executeSql("CREATE TABLE def (id INT PRIMARY KEY, val INT)");
+
+executeSql("CREATE ZONE foo WITH partitions=1, storage_profiles='" + 
DEFAULT_AIPERSIST_PROFILE_NAME + "'");
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT) WITH 
PRIMARY_ZONE = 'FOO'");
+
+var response = client.toBlocking().exchange("/state/local/Default/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+assertEquals(DEFAULT_PARTITION_COUNT, response.body().states().size());
+
+response = client.toBlocking().exchange("/state/local/FOO/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+assertEquals(1, response.body().states().size());
+}
+
+@Test
+void testLocalPartitionStatesByZoneJson() {
+executeSql("CREATE ZONE foo WITH partitions=1, storage_profiles='" + 
DEFAULT_AIPERSIST_PROFILE_NAME + "'");
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT) WITH 
PRIMARY_ZONE = 

Re: [PR] IGNITE-21156 : [IEP-114] Custom metrics introduction [ignite]

2024-04-19 Thread via GitHub


NSAmelchev merged PR #11293:
URL: https://github.com/apache/ignite/pull/11293


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571932369


##
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/HashJoinPlannerTest.java:
##
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.engine.planner;
+
+import static 
org.apache.ignite.internal.sql.engine.planner.CorrelatedSubqueryPlannerTest.createTestTable;
+
+import java.util.stream.Stream;
+import org.apache.calcite.plan.RelOptPlanner.CannotPlanException;
+import org.apache.ignite.internal.sql.engine.rel.IgniteHashJoin;
+import org.apache.ignite.internal.sql.engine.schema.IgniteSchema;
+import org.apache.ignite.internal.sql.engine.schema.IgniteTable;
+import org.apache.ignite.internal.testframework.IgniteTestUtils;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+/** HashJoin planner test. */
+public class HashJoinPlannerTest extends AbstractPlannerTest {
+private static final String[] disabledRules = {"NestedLoopJoinConverter", 
"CorrelatedNestedLoopJoin", "MergeJoinConverter"};
+
+private static final String[] joinTypes = {"LEFT", "RIGHT", "INNER", "FULL 
OUTER"};
+
+/** Check that only appropriate conditions are acceptable for hash join. */
+@ParameterizedTest()
+@MethodSource("joinConditions")
+@SuppressWarnings("ThrowableNotThrown")
+public void hashJoinAppliedConditions(String sql, boolean canBePlanned) 
throws Exception {
+IgniteTable tbl = createTestTable("ID", "C1");
+
+IgniteSchema schema = createSchema(tbl);
+
+for (String type : joinTypes) {
+String sql0 = String.format(sql, type);
+
+if (canBePlanned) {
+assertPlan(sql0, schema, 
nodeOrAnyChild(isInstanceOf(IgniteHashJoin.class)), disabledRules);
+} else {
+IgniteTestUtils.assertThrowsWithCause(() -> physicalPlan(sql0, 
schema, disabledRules),
+CannotPlanException.class,
+"There are not enough rules");
+}
+}
+}
+
+private static Stream joinConditions() {
+return Stream.of(
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
t2.c1", true),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 using(c1)", 
true),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
1", false),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 ON t1.id is 
not distinct from t2.c1", false),

Review Comment:
   https://issues.apache.org/jira/browse/IGNITE-22074



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571915366


##
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/HashJoinPlannerTest.java:
##
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.engine.planner;
+
+import static 
org.apache.ignite.internal.sql.engine.planner.CorrelatedSubqueryPlannerTest.createTestTable;
+
+import java.util.stream.Stream;
+import org.apache.calcite.plan.RelOptPlanner.CannotPlanException;
+import org.apache.ignite.internal.sql.engine.rel.IgniteHashJoin;
+import org.apache.ignite.internal.sql.engine.schema.IgniteSchema;
+import org.apache.ignite.internal.sql.engine.schema.IgniteTable;
+import org.apache.ignite.internal.testframework.IgniteTestUtils;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+/** HashJoin planner test. */
+public class HashJoinPlannerTest extends AbstractPlannerTest {
+private static final String[] disabledRules = {"NestedLoopJoinConverter", 
"CorrelatedNestedLoopJoin", "MergeJoinConverter"};
+
+private static final String[] joinTypes = {"LEFT", "RIGHT", "INNER", "FULL 
OUTER"};
+
+/** Check that only appropriate conditions are acceptable for hash join. */
+@ParameterizedTest()
+@MethodSource("joinConditions")
+@SuppressWarnings("ThrowableNotThrown")
+public void hashJoinAppliedConditions(String sql, boolean canBePlanned) 
throws Exception {

Review Comment:
   append hashJoinWinsOnLeftSkewedInput test, but seems i still need one 
disabled rule here: JoinCommuteRule



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571916999


##
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/HashJoinPlannerTest.java:
##
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.engine.planner;
+
+import static 
org.apache.ignite.internal.sql.engine.planner.CorrelatedSubqueryPlannerTest.createTestTable;
+
+import java.util.stream.Stream;
+import org.apache.calcite.plan.RelOptPlanner.CannotPlanException;
+import org.apache.ignite.internal.sql.engine.rel.IgniteHashJoin;
+import org.apache.ignite.internal.sql.engine.schema.IgniteSchema;
+import org.apache.ignite.internal.sql.engine.schema.IgniteTable;
+import org.apache.ignite.internal.testframework.IgniteTestUtils;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+/** HashJoin planner test. */
+public class HashJoinPlannerTest extends AbstractPlannerTest {
+private static final String[] disabledRules = {"NestedLoopJoinConverter", 
"CorrelatedNestedLoopJoin", "MergeJoinConverter"};
+
+private static final String[] joinTypes = {"LEFT", "RIGHT", "INNER", "FULL 
OUTER"};
+
+/** Check that only appropriate conditions are acceptable for hash join. */
+@ParameterizedTest()
+@MethodSource("joinConditions")
+@SuppressWarnings("ThrowableNotThrown")
+public void hashJoinAppliedConditions(String sql, boolean canBePlanned) 
throws Exception {
+IgniteTable tbl = createTestTable("ID", "C1");
+
+IgniteSchema schema = createSchema(tbl);
+
+for (String type : joinTypes) {
+String sql0 = String.format(sql, type);
+
+if (canBePlanned) {
+assertPlan(sql0, schema, 
nodeOrAnyChild(isInstanceOf(IgniteHashJoin.class)), disabledRules);
+} else {
+IgniteTestUtils.assertThrowsWithCause(() -> physicalPlan(sql0, 
schema, disabledRules),
+CannotPlanException.class,
+"There are not enough rules");
+}
+}
+}
+
+private static Stream joinConditions() {
+return Stream.of(
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
t2.c1", true),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 using(c1)", 
true),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
1", false),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 ON t1.id is 
not distinct from t2.c1", false),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
?", false),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
OCTET_LENGTH('TEST')", false),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
t2.c1 and t1.ID > t2.ID", false),
+Arguments.of("select t1.c1 from t1 %s join t1 t2 on t1.c1 = 
1", false),

Review Comment:
   oh, missed, done



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22069 Optimize entries expiration [ignite]

2024-04-19 Thread via GitHub


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


##
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java:
##
@@ -2169,6 +2169,20 @@ public List remove(L lower, L upper, int limit) 
throws IgniteCheckedException
 return Collections.unmodifiableList(rmvOp.removedRows);
 }
 
+/**
+ * @param lower Lower bound (inclusive).
+ * @param upper Upper bound (inclusive).
+ * @param x Implementation specific argument.
+ * @param limit Limit of processed entries by single call, {@code 0} for 
no limit.
+ * @return {@code True} if removed at least one row.
+ * @throws IgniteCheckedException If failed.
+ */
+protected boolean removex(L lower, L upper, Object x, int limit) throws 
IgniteCheckedException {

Review Comment:
   This method uses private class and private method, so can't be inlined in 
other classes.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


lowka commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1571901207


##
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/DefaultValue.java:
##
@@ -51,10 +65,20 @@ public static DefaultValue constant(@Nullable Object value) 
{
 /** Types of the defaults. */
 public enum Type {
 /** Default is specified as a constant. */
-CONSTANT,
+CONSTANT(0),
 
 /** Default is specified as a call to a function. */
-FUNCTION_CALL
+FUNCTION_CALL(1);
+
+/** Represents absent of default value ({@code null}). */
+private static final int NO_DEFAULT = -1;
+
+/** type id used by serialization. */

Review Comment:
   Thanks.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571920626


##
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/rel/IgniteHashJoin.java:
##
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.engine.rel;
+
+import java.util.List;
+import java.util.Set;
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelOptCost;
+import org.apache.calcite.plan.RelOptPlanner;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelInput;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.CorrelationId;
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.util.Util;
+import org.apache.ignite.internal.sql.engine.metadata.cost.IgniteCost;
+import org.apache.ignite.internal.sql.engine.metadata.cost.IgniteCostFactory;
+import org.apache.ignite.internal.sql.engine.util.Commons;
+
+/**
+ * Relational operator that represent hash join algo.
+ */
+public class IgniteHashJoin extends AbstractIgniteJoin {
+private static final String REL_TYPE_NAME = "HashJoin";
+
+public IgniteHashJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode 
left, RelNode right,
+RexNode condition, Set variablesSet, JoinRelType 
joinType) {
+super(cluster, traitSet, left, right, condition, variablesSet, 
joinType);
+}
+
+/** Constructor. */
+public IgniteHashJoin(RelInput input) {
+this(input.getCluster(),
+input.getTraitSet().replace(IgniteConvention.INSTANCE),
+input.getInputs().get(0),
+input.getInputs().get(1),
+input.getExpression("condition"),
+
Set.copyOf(Commons.transform(input.getIntegerList("variablesSet"), 
CorrelationId::new)),
+input.getEnum("joinType", JoinRelType.class));
+}
+
+/** {@inheritDoc} */
+@Override
+public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery 
mq) {
+IgniteCostFactory costFactory = (IgniteCostFactory) 
planner.getCostFactory();
+
+double rowCount = 0;
+double leftRowCount = mq.getRowCount(getLeft());
+double rightRowCount = mq.getRowCount(getRight());
+
+if (Double.isInfinite(leftRowCount) || 
Double.isInfinite(rightRowCount)) {
+return planner.getCostFactory().makeInfiniteCost();
+}
+
+rowCount += leftRowCount;
+// believe in some kind of keys equality
+rowCount += Util.nLogN(rightRowCount);
+
+double rightSize = rightRowCount * 
(getRight().getRowType().getFieldCount() * 8) * IgniteCost.AVERAGE_FIELD_SIZE;
+
+return costFactory.makeCost(rowCount, rowCount * 
IgniteCost.ROW_PASS_THROUGH_COST, 0, rightSize, 0);

Review Comment:
   i rethink and refactor here



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


lowka commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1571899954


##
modules/core/src/test/java/org/apache/ignite/internal/util/io/IgniteUnsafeDataInputOutputByteOrderTest.java:
##
@@ -237,4 +249,101 @@ public void testDoubleArray() throws Exception {
 
 assertArrayEquals(arr, in.readDoubleArray(ARR_LEN), 0);
 }
+
+@Test
+public void testLocalTime() throws IOException {
+LocalTime val = LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(1));
+
+out.writeLocalTime(val);
+
+assertEquals(val, in.readLocalTime());
+}
+
+@Test
+public void testLocalDate() throws IOException {
+LocalDate val = LocalDate.of(RND.nextInt(500) + 1900, RND.nextInt(12) 
+ 1, 1 + RND.nextInt(27));
+
+out.writeLocalDate(val);
+
+assertEquals(val, in.readLocalDate());
+}
+
+@Test
+public void testLocalDateTime() throws IOException {
+LocalTime time = LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(1));
+LocalDate date = LocalDate.of(RND.nextInt(500) + 1900, RND.nextInt(12) 
+ 1, 1 + RND.nextInt(27));
+LocalDateTime val = LocalDateTime.of(date, time);
+
+out.writeLocalDateTime(val);
+
+assertEquals(val, in.readLocalDateTime());
+}
+
+@Test
+public void testInstant() throws IOException {
+Instant val = Instant.ofEpochMilli(Math.abs(RND.nextLong()));

Review Comment:
   Thanks, done.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


lowka commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1571900351


##
modules/core/src/main/java/org/apache/ignite/internal/util/io/IgniteDataOutput.java:
##
@@ -129,6 +139,86 @@ public interface IgniteDataOutput extends DataOutput {
  */
 void writeCharArray(char[] arr) throws IOException;
 
+/**
+ * Writes big integer.
+ *
+ * @param val Big integer.
+ * @throws IOException In case of error.
+ */
+void writeBigInteger(BigInteger val) throws IOException;
+
+/**
+ * Writes decimal.
+ *
+ * @param val Decimal.

Review Comment:
   Done.



##
modules/core/src/test/java/org/apache/ignite/internal/util/io/IgniteUnsafeDataInputOutputByteOrderTest.java:
##
@@ -237,4 +249,101 @@ public void testDoubleArray() throws Exception {
 
 assertArrayEquals(arr, in.readDoubleArray(ARR_LEN), 0);
 }
+
+@Test
+public void testLocalTime() throws IOException {
+LocalTime val = LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(1));
+
+out.writeLocalTime(val);
+
+assertEquals(val, in.readLocalTime());
+}
+
+@Test
+public void testLocalDate() throws IOException {
+LocalDate val = LocalDate.of(RND.nextInt(500) + 1900, RND.nextInt(12) 
+ 1, 1 + RND.nextInt(27));
+
+out.writeLocalDate(val);
+
+assertEquals(val, in.readLocalDate());
+}
+
+@Test
+public void testLocalDateTime() throws IOException {
+LocalTime time = LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(1));
+LocalDate date = LocalDate.of(RND.nextInt(500) + 1900, RND.nextInt(12) 
+ 1, 1 + RND.nextInt(27));

Review Comment:
   Fixed, thanks.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571919793


##
modules/sql-engine/src/testFixtures/java/org/apache/ignite/internal/sql/BaseSqlIntegrationTest.java:
##
@@ -111,19 +111,29 @@ protected enum JoinType {
 NESTED_LOOP(
 "CorrelatedNestedLoopJoin",
 "JoinCommuteRule",
-"MergeJoinConverter"
+"MergeJoinConverter",
+"HashJoinConverter"
 ),
 
 MERGE(
 "CorrelatedNestedLoopJoin",
 "JoinCommuteRule",
-"NestedLoopJoinConverter"
+"NestedLoopJoinConverter",
+"HashJoinConverter"
 ),
 
 CORRELATED(
 "MergeJoinConverter",
 "JoinCommuteRule",
-"NestedLoopJoinConverter"
+"NestedLoopJoinConverter",
+"HashJoinConverter"
+),
+
+HASHJOIN(
+"MergeJoinConverter",
+"JoinCommuteRule",
+"NestedLoopJoinConverter",
+"CorrelatedNestedLoopJoin"

Review Comment:
   done



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1571920426


##
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/rel/IgniteHashJoin.java:
##
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.engine.rel;
+
+import java.util.List;
+import java.util.Set;
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelOptCost;
+import org.apache.calcite.plan.RelOptPlanner;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelInput;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.CorrelationId;
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.util.Util;
+import org.apache.ignite.internal.sql.engine.metadata.cost.IgniteCost;
+import org.apache.ignite.internal.sql.engine.metadata.cost.IgniteCostFactory;
+import org.apache.ignite.internal.sql.engine.util.Commons;
+
+/**
+ * Relational operator that represent hash join algo.
+ */
+public class IgniteHashJoin extends AbstractIgniteJoin {
+private static final String REL_TYPE_NAME = "HashJoin";
+
+public IgniteHashJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode 
left, RelNode right,
+RexNode condition, Set variablesSet, JoinRelType 
joinType) {
+super(cluster, traitSet, left, right, condition, variablesSet, 
joinType);
+}
+
+/** Constructor. */
+public IgniteHashJoin(RelInput input) {
+this(input.getCluster(),
+input.getTraitSet().replace(IgniteConvention.INSTANCE),
+input.getInputs().get(0),
+input.getInputs().get(1),
+input.getExpression("condition"),
+
Set.copyOf(Commons.transform(input.getIntegerList("variablesSet"), 
CorrelationId::new)),
+input.getEnum("joinType", JoinRelType.class));
+}
+
+/** {@inheritDoc} */
+@Override
+public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery 
mq) {
+IgniteCostFactory costFactory = (IgniteCostFactory) 
planner.getCostFactory();
+
+double rowCount = 0;
+double leftRowCount = mq.getRowCount(getLeft());
+double rightRowCount = mq.getRowCount(getRight());
+
+if (Double.isInfinite(leftRowCount) || 
Double.isInfinite(rightRowCount)) {
+return planner.getCostFactory().makeInfiniteCost();
+}
+
+rowCount += leftRowCount;
+// believe in some kind of keys equality
+rowCount += Util.nLogN(rightRowCount);
+
+double rightSize = rightRowCount * 
(getRight().getRowType().getFieldCount() * 8) * IgniteCost.AVERAGE_FIELD_SIZE;

Review Comment:
   i rethink and refactor here



##
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/rel/IgniteHashJoin.java:
##
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.engine.rel;
+
+import java.util.List;
+import java.util.Set;
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelOptCost;
+import org.apache.calcite.plan.RelOptPlanner;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelInput;

Re: [PR] Bump org.apache.calcite.avatica:avatica-core from 1.24.0 to 1.25.0 [ignite-3]

2024-04-19 Thread via GitHub


ptupitsyn merged PR #3624:
URL: https://github.com/apache/ignite-3/pull/3624


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Bump archunit from 1.2.1 to 1.3.0 [ignite-3]

2024-04-19 Thread via GitHub


ptupitsyn merged PR #3623:
URL: https://github.com/apache/ignite-3/pull/3623


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-18647 Sql. Implement missed Statement and StatementBuilder methods. [ignite-3]

2024-04-19 Thread via GitHub


xtern commented on code in PR #3626:
URL: https://github.com/apache/ignite-3/pull/3626#discussion_r1572295214


##
modules/api/src/main/java/org/apache/ignite/sql/Statement.java:
##
@@ -140,16 +113,22 @@ interface StatementBuilder {
  */
 StatementBuilder pageSize(int pageSize);
 
-/** Returns a statement time zone. */
-ZoneId timeZoneId();
-
 /**
  * Sets a time zone for this statement.
  *
- * @param timeZoneId Time zone ID.
+ * This time zone is used in the following cases:
+ * 
+ * When using SQL functions to obtain the current time (for 
example {@code SELECT CURRENT_TIME})
+ * When converting a string literal to/from a TIMESTAMP WITH 
LOCAL TIME ZONE column
+ * (for example {@code SELECT TIMESTAMP WITH LOCAL TIME ZONE 
'1992-01-18 02:30:00.123'}
+ * 
+ *
+ * If the time zone has not been set explicitly, the current JVM 
default time zone will be used.
+ *
+ * @param timeZone Time zone.
  * @return {@code this} for chaining.
  */
-StatementBuilder timeZoneId(ZoneId timeZoneId);
+StatementBuilder timeZone(ZoneId timeZone);

Review Comment:
   Renamed it back, thanks.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-18647 Sql. Implement missed Statement and StatementBuilder methods. [ignite-3]

2024-04-19 Thread via GitHub


xtern commented on code in PR #3626:
URL: https://github.com/apache/ignite-3/pull/3626#discussion_r1572295214


##
modules/api/src/main/java/org/apache/ignite/sql/Statement.java:
##
@@ -140,16 +113,22 @@ interface StatementBuilder {
  */
 StatementBuilder pageSize(int pageSize);
 
-/** Returns a statement time zone. */
-ZoneId timeZoneId();
-
 /**
  * Sets a time zone for this statement.
  *
- * @param timeZoneId Time zone ID.
+ * This time zone is used in the following cases:
+ * 
+ * When using SQL functions to obtain the current time (for 
example {@code SELECT CURRENT_TIME})
+ * When converting a string literal to/from a TIMESTAMP WITH 
LOCAL TIME ZONE column
+ * (for example {@code SELECT TIMESTAMP WITH LOCAL TIME ZONE 
'1992-01-18 02:30:00.123'}
+ * 
+ *
+ * If the time zone has not been set explicitly, the current JVM 
default time zone will be used.
+ *
+ * @param timeZone Time zone.
  * @return {@code this} for chaining.
  */
-StatementBuilder timeZoneId(ZoneId timeZoneId);
+StatementBuilder timeZone(ZoneId timeZone);

Review Comment:
   Renamed it back



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] IGNITE-22080 Fix ConflictResolver fails on debug logging [ignite-extensions]

2024-04-19 Thread via GitHub


timoninmaxim opened a new pull request, #261:
URL: https://github.com/apache/ignite-extensions/pull/261

   (no comment)


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Is Ignite 2.16.0 impacted by CVE-2024-22243 ? [ignite]

2024-04-19 Thread via GitHub


ptupitsyn commented on issue #11322:
URL: https://github.com/apache/ignite/issues/11322#issuecomment-2066419979

   > Applications that use `UriComponentsBuilder`
   
   Ignite does not use `UriComponentsBuilder` at all, not a single match in the 
source code: 
https://github.com/search?q=repo%3Aapache%2Fignite%20UriComponentsBuilder=code
   
   Looks there is no issue.
   
   


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Is Ignite 2.16.0 impacted by CVE-2024-22243 ? [ignite]

2024-04-19 Thread via GitHub


ptupitsyn closed issue #11322: Is Ignite 2.16.0 impacted by  CVE-2024-22243 ?
URL: https://github.com/apache/ignite/issues/11322


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Ignite cluster (both client and server) breaking intermittently with 401 http code in AKS [ignite]

2024-04-19 Thread via GitHub


sk0x50 closed issue #10714: Ignite cluster (both client and server) breaking 
intermittently with 401 http code in AKS
URL: https://github.com/apache/ignite/issues/10714


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22080 Fix ConflictResolver fails on debug logging [ignite-extensions]

2024-04-19 Thread via GitHub


dspavlov commented on code in PR #261:
URL: https://github.com/apache/ignite-extensions/pull/261#discussion_r1572305786


##
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/conflictresolve/DebugCacheVersionConflictResolverImpl.java:
##
@@ -63,6 +63,16 @@ public DebugCacheVersionConflictResolverImpl(byte clusterId, 
String conflictReso
 return res;
 }
 
+/** @return Conflict resolve field value, or specified {@code val} if the 
field not found. */
+private Object debugValue(Object val) {
+try {
+return super.value(val);
+}
+catch (Exception e) {
+return val;

Review Comment:
   LGTM in general, Just a minor comment.
   
   can we add java comment about logging this exception - it will be logged at 
a top level?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21923: Cover SQL E051-09(Basic query specification, Rename columns in the FROM clause) feature by tests [ignite-3]

2024-04-19 Thread via GitHub


ygerzhedovich merged PR #3628:
URL: https://github.com/apache/ignite-3/pull/3628


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22080 Fix ConflictResolver fails on debug logging [ignite-extensions]

2024-04-19 Thread via GitHub


timoninmaxim commented on code in PR #261:
URL: https://github.com/apache/ignite-extensions/pull/261#discussion_r1572314189


##
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/conflictresolve/DebugCacheVersionConflictResolverImpl.java:
##
@@ -63,6 +63,16 @@ public DebugCacheVersionConflictResolverImpl(byte clusterId, 
String conflictReso
 return res;
 }
 
+/** @return Conflict resolve field value, or specified {@code val} if the 
field not found. */
+private Object debugValue(Object val) {
+try {
+return super.value(val);
+}
+catch (Exception e) {
+return val;

Review Comment:
   Added log



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Is there a function to obtain hotkeys implemented [ignite]

2024-04-19 Thread via GitHub


sk0x50 commented on issue #10836:
URL: https://github.com/apache/ignite/issues/10836#issuecomment-2066530568

   Hi @lvchongyi ,
   
   There is no such API.
   It is unclear what the goal is and what you are trying to achieve, but 
anyway, the following two topics might be useful:
   
   - you can try to enable ignite events and build a list of "hot keys" on your 
side based on keys in cache events. [Working with 
Events](https://ignite.apache.org/docs/latest/events/listening-to-events)
- please take a look at near caches. this feature allows creation of a 
local cache that stores the most recently or most frequently accessed data on 
the local node. [Near 
Caches](https://ignite.apache.org/docs/latest/configuring-caches/near-cache)
   


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Is there a function to obtain hotkeys implemented [ignite]

2024-04-19 Thread via GitHub


sk0x50 closed issue #10836: Is there a function to obtain hotkeys implemented
URL: https://github.com/apache/ignite/issues/10836


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Ignite\Work folder is getting saved to the path "C:\Windows\System32\ignite\work\log" after dotnet6 upgrade of the project [ignite]

2024-04-19 Thread via GitHub


sk0x50 closed issue #11005: Ignite\Work folder is getting saved to the path 
"C:\Windows\System32\ignite\work\log" after dotnet6 upgrade of the project
URL: https://github.com/apache/ignite/issues/11005


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22072 : Fix the extensions for Custom Metrics [ignite-extensions]

2024-04-19 Thread via GitHub


NSAmelchev merged PR #260:
URL: https://github.com/apache/ignite-extensions/pull/260


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[I] Is there any plan to support window aggregation in Calcite Query Engine [ignite]

2024-04-19 Thread via GitHub


asdfgh19 opened a new issue, #11321:
URL: https://github.com/apache/ignite/issues/11321

   ```
   select  "deptno",
rank() over (order by "deptno") as r
   from "hr"."emps"
   ```
   Calcite supports the above Sql, but Ignite's Calcite Query Engine does not 
support window aggregation syntax. Is there any plan to implement window 
aggregation in Calcite Query Engine.


-- 
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: notifications-unsubscr...@ignite.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


xtern commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1572234538


##
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/storage/CatalogEntrySerializationTest.java:
##
@@ -144,6 +174,85 @@ void test(MarshallableEntryType type) {
 }
 }
 
+@ParameterizedTest(name = "{0}")
+@MethodSource("values")
+public void constantDefault(ColumnType columnType, Object value) throws 
IOException {
+ConstantValue val = (ConstantValue) DefaultValue.constant(value);
+
+log.info("{}: {}", columnType, value);
+
+try (IgniteUnsafeDataOutput os = new IgniteUnsafeDataOutput(128)) {
+DefaultValue.writeTo(val, os);
+
+try (IgniteUnsafeDataInput in = new 
IgniteUnsafeDataInput(os.internalArray())) {
+DefaultValue actual = DefaultValue.readFrom(in);
+assertEquals(val, actual);
+}
+}
+}
+
+private static Stream values() {
+List list = new ArrayList<>();
+
+list.add(null);
+list.add(RND.nextBoolean());
+
+list.add((byte) RND.nextInt());
+list.add((short) RND.nextInt());
+list.add(RND.nextInt());
+list.add(RND.nextLong());
+list.add((float) RND.nextDouble());
+list.add(RND.nextDouble());
+
+list.add(BigDecimal.valueOf(RND.nextLong()));
+list.add(BigDecimal.valueOf(RND.nextLong(), RND.nextInt(100)));
+
+list.add(BigInteger.valueOf(RND.nextLong()));
+
+list.add(LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(100_000)));
+list.add(LocalDate.of(RND.nextInt(4000) - 1000, RND.nextInt(12) + 1, 
RND.nextInt(27) + 1));
+list.add(LocalDateTime.of(
+LocalDate.of(RND.nextInt(4000) - 1000, RND.nextInt(12) + 1, 
RND.nextInt(27) + 1),
+LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(100_000))
+));
+
+byte[] bytes = new byte[RND.nextInt(1000)];
+RND.nextBytes(bytes);
+list.add(Base64.getEncoder().encodeToString(bytes));
+
+list.add(UUID.randomUUID());
+
+// TODO Include ignored values to test after 
https://issues.apache.org/jira/browse/IGNITE-15200
+//  list.add(Duration.of(11, ChronoUnit.HOURS));
+//  list.add(Period.of(5, 4, 3));
+
+BitSet bitSet = new BitSet();
+for (int i = 0; i < RND.nextInt(100); i++) {
+int b = RND.nextInt(1024);
+bitSet.set(b);
+}
+list.add(bitSet);
+
+return list.stream().map(val -> {
+NativeType nativeType = NativeTypes.fromObject(val);
+return Arguments.of(nativeType == null ? ColumnType.NULL : 
nativeType.spec().asColumnType(), val);
+});
+}
+
+@Test
+public void functionCallDefault() throws IOException{

Review Comment:
   Actually, such tests already exist (for example in `checkAlterColumnEntry`). 
If you prefer to keep this test separate, I also suggest renaming it with a 
"test" prefix :thinking: 



##
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/storage/CatalogEntrySerializationTest.java:
##
@@ -144,6 +174,85 @@ void test(MarshallableEntryType type) {
 }
 }
 
+@ParameterizedTest(name = "{0}")
+@MethodSource("values")
+public void constantDefault(ColumnType columnType, Object value) throws 
IOException {

Review Comment:
   ```suggestion
   public void testConstantDefaultAllTypes(ColumnType columnType, Object 
value) throws IOException {
   ```



##
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/DefaultValue.java:
##
@@ -68,9 +92,25 @@ public Type type() {
 return type;
 }
 
+/** Reads default value or {@code null}. */
+public static @Nullable DefaultValue readFrom(IgniteDataInput in) throws 
IOException {

Review Comment:
   I suggest moving this method below just before `writeTo()`..



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


xtern commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1572230375


##
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/storage/CatalogEntrySerializationTest.java:
##
@@ -144,6 +174,85 @@ void test(MarshallableEntryType type) {
 }
 }
 
+@ParameterizedTest(name = "{0}")
+@MethodSource("values")
+public void constantDefault(ColumnType columnType, Object value) throws 
IOException {

Review Comment:
   ```suggestion
   public void testConstantDefaultAllTypes(ColumnType columnType, Object 
value) throws IOException {
   ```
   :thinking: 



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21935: Cover SQL E153(Updatable queries with subqueries) feature by tests [ignite-3]

2024-04-19 Thread via GitHub


ygerzhedovich merged PR #3630:
URL: https://github.com/apache/ignite-3/pull/3630


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


ibessonov commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572157617


##
modules/rest-api/src/main/java/org/apache/ignite/internal/rest/api/recovery/DisasterRecoveryApi.java:
##
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.api.recovery;
+
+import io.micronaut.http.annotation.Controller;
+import io.micronaut.http.annotation.Get;
+import io.micronaut.http.annotation.PathVariable;
+import io.micronaut.http.annotation.Produces;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.internal.rest.api.Problem;
+import org.apache.ignite.internal.rest.constants.MediaType;
+
+/**
+ * Disaster recovery controller.
+ */
+@Controller("/management/v1/recovery")
+@Tag(name = "recovery")
+public interface DisasterRecoveryApi {
+@Get("state/local")
+@Operation(operationId = "getLocalPartitionStates", description = "Returns 
local partition states.")
+@ApiResponse(responseCode = "200", description = "Partition states 
returned.")
+@ApiResponse(responseCode = "500", description = "Internal error.",
+content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
+@Produces(MediaType.APPLICATION_JSON)
+CompletableFuture getLocalPartitionStates();
+
+@Get("state/local/{zoneName}")
+@Operation(operationId = "getLocalPartitionStatesByZone", description = 
"Returns local partition states.")
+@ApiResponse(responseCode = "200", description = "Partition states 
returned.")
+@ApiResponse(responseCode = "500", description = "Internal error.",
+content = @Content(mediaType = MediaType.PROBLEM_JSON, schema = 
@Schema(implementation = Problem.class)))
+@ApiResponse(responseCode = "400", description = "Zone is not found.",

Review Comment:
   Code clearly shows that we use 400 for configuration path that doesn't 
exist. In fact, I believe that our rest endpoints never return 404 by 
themselves, and 404 means that endpoint itself is not yet registered or 
something



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-18647 Sql. Implement missed Statement and StatementBuilder methods. [ignite-3]

2024-04-19 Thread via GitHub


ygerzhedovich commented on code in PR #3626:
URL: https://github.com/apache/ignite-3/pull/3626#discussion_r1572215705


##
modules/api/src/main/java/org/apache/ignite/sql/Statement.java:
##
@@ -140,16 +113,22 @@ interface StatementBuilder {
  */
 StatementBuilder pageSize(int pageSize);
 
-/** Returns a statement time zone. */
-ZoneId timeZoneId();
-
 /**
  * Sets a time zone for this statement.
  *
- * @param timeZoneId Time zone ID.
+ * This time zone is used in the following cases:
+ * 
+ * When using SQL functions to obtain the current time (for 
example {@code SELECT CURRENT_TIME})
+ * When converting a string literal to/from a TIMESTAMP WITH 
LOCAL TIME ZONE column
+ * (for example {@code SELECT TIMESTAMP WITH LOCAL TIME ZONE 
'1992-01-18 02:30:00.123'}
+ * 
+ *
+ * If the time zone has not been set explicitly, the current JVM 
default time zone will be used.
+ *
+ * @param timeZone Time zone.
  * @return {@code this} for chaining.
  */
-StatementBuilder timeZoneId(ZoneId timeZoneId);
+StatementBuilder timeZone(ZoneId timeZone);

Review Comment:
   what reason to rename it? Time-zone ID is standard termin' for java



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] next candidate test [ignite-3]

2024-04-19 Thread via GitHub


denis-chudov opened a new pull request, #3634:
URL: https://github.com/apache/ignite-3/pull/3634

   Thank you for submitting the pull request.
   
   To streamline the review process of the patch and ensure better code quality
   we ask both an author and a reviewer to verify the following:
   
   ### The Review Checklist
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. 
Also make sure to complete the following:  
   \- There is a single JIRA ticket related to the pull request.  
   \- The web-link to the pull request is attached to the JIRA ticket.  
   \- The JIRA ticket has the Patch Available state.  
   \- The description of the JIRA ticket explains WHAT was made, WHY and HOW.  
   \- The pull request title is treated as the final commit message. The 
following pattern must be used: IGNITE- Change summary where  - number 
of JIRA issue.
   - [ ] **Design:** new code conforms with the design principles of the 
components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size 
must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer 
documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, 
happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding 
Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21257 Introduce REST API for viewing partition states [ignite-3]

2024-04-19 Thread via GitHub


ibessonov commented on code in PR #3614:
URL: https://github.com/apache/ignite-3/pull/3614#discussion_r1572170160


##
modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/recovery/ItDisasterRecoveryControllerTest.java:
##
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.recovery;
+
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.IntStream.range;
+import static 
org.apache.ignite.internal.TestDefaultProfilesNames.DEFAULT_AIPERSIST_PROFILE_NAME;
+import static 
org.apache.ignite.internal.catalog.commands.CatalogUtils.DEFAULT_PARTITION_COUNT;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import io.micronaut.http.HttpResponse;
+import io.micronaut.http.HttpStatus;
+import io.micronaut.http.client.HttpClient;
+import io.micronaut.http.client.annotation.Client;
+import io.micronaut.http.client.exceptions.HttpClientResponseException;
+import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
+import jakarta.inject.Inject;
+import java.util.List;
+import org.apache.ignite.internal.Cluster;
+import org.apache.ignite.internal.ClusterPerTestIntegrationTest;
+import 
org.apache.ignite.internal.rest.api.recovery.GlobalPartitionStateResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.GlobalPartitionStatesResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.LocalPartitionStateResponse;
+import 
org.apache.ignite.internal.rest.api.recovery.LocalPartitionStatesResponse;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test for disaster recovery REST commands.
+ */
+@MicronautTest
+public class ItDisasterRecoveryControllerTest extends 
ClusterPerTestIntegrationTest {
+private static final String NODE_URL = "http://localhost:; + 
Cluster.BASE_HTTP_PORT;
+
+@Inject
+@Client(NODE_URL + "/management/v1/recovery/")
+HttpClient client;
+
+@Override
+protected int initialNodes() {
+return 1;
+}
+
+@Test
+void testLocalPartitionStates() {
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT)");
+var response = client.toBlocking().exchange("/state/local/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+
+LocalPartitionStatesResponse body = response.body();
+assertEquals(DEFAULT_PARTITION_COUNT, body.states().size());
+
+List partitionIds = 
body.states().stream().map(LocalPartitionStateResponse::partitionId).collect(toList());
+assertEquals(range(0, 
DEFAULT_PARTITION_COUNT).boxed().collect(toList()), partitionIds);
+}
+
+@Test
+void testLocalPartitionStatesByZoneMissingZone() {
+HttpClientResponseException thrown = assertThrows(
+HttpClientResponseException.class,
+() -> client.toBlocking().exchange("/state/local/foo/", 
LocalPartitionStatesResponse.class)
+);
+
+assertEquals(HttpStatus.BAD_REQUEST, thrown.getResponse().status());
+}
+
+@Test
+void testLocalPartitionStatesByZone() {
+executeSql("CREATE TABLE def (id INT PRIMARY KEY, val INT)");
+
+executeSql("CREATE ZONE foo WITH partitions=1, storage_profiles='" + 
DEFAULT_AIPERSIST_PROFILE_NAME + "'");
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT) WITH 
PRIMARY_ZONE = 'FOO'");
+
+var response = client.toBlocking().exchange("/state/local/Default/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+assertEquals(DEFAULT_PARTITION_COUNT, response.body().states().size());
+
+response = client.toBlocking().exchange("/state/local/FOO/", 
LocalPartitionStatesResponse.class);
+
+assertEquals(HttpStatus.OK, response.status());
+assertEquals(1, response.body().states().size());
+}
+
+@Test
+void testLocalPartitionStatesByZoneJson() {
+executeSql("CREATE ZONE foo WITH partitions=1, storage_profiles='" + 
DEFAULT_AIPERSIST_PROFILE_NAME + "'");
+executeSql("CREATE TABLE foo (id INT PRIMARY KEY, val INT) WITH 
PRIMARY_ZONE = 

Re: [PR] IGNITE-21923: Cover SQL E051-09(Basic query specification, Rename columns in the FROM clause) feature by tests [ignite-3]

2024-04-19 Thread via GitHub


ygerzhedovich commented on code in PR #3628:
URL: https://github.com/apache/ignite-3/pull/3628#discussion_r1572188895


##
modules/sql-engine/src/integrationTest/sql/basic_queries/rename_columns_in 
_from.test:
##
@@ -0,0 +1,47 @@
+# name: sql/basic_queries/rename_columns_in _from.test
+# description: SQL feature E051-9 (Basic query specification. Rename columns 
in the FROM clause)
+# feature: E051-09
+# group: [basic_queries]
+
+statement ok
+CREATE TABLE tab ( A INT PRIMARY KEY, B INT )
+
+statement ok
+INSERT INTO tab VALUES(1,13), (2,12), (3,11)
+
+query II
+SELECT ALL alias . X , Y FROM tab AS alias (X, Y) order by x
+
+1  13
+2  12
+3  11
+
+query II
+SELECT DISTINCT alias.Y, X FROM tab AS alias (X, Y) order by y
+
+11 3
+12 2
+13 1
+
+query II
+SELECT alias.X, Y FROM tab AS alias (X, Y) order by x

Review Comment:
   added



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21923: Cover SQL E051-09(Basic query specification, Rename columns in the FROM clause) feature by tests [ignite-3]

2024-04-19 Thread via GitHub


ygerzhedovich commented on code in PR #3628:
URL: https://github.com/apache/ignite-3/pull/3628#discussion_r1572188600


##
modules/sql-engine/src/integrationTest/sql/basic_queries/rename_columns_in 
_from.test:
##
@@ -0,0 +1,47 @@
+# name: sql/basic_queries/rename_columns_in _from.test

Review Comment:
   fixed 



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21996 Improve test coverage for ALTER COLUMN command. [ignite-3]

2024-04-19 Thread via GitHub


xtern merged PR #3631:
URL: https://github.com/apache/ignite-3/pull/3631


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] IGNITE-21940 Sql. Cover SQL F304(EXCEPT ALL table operator) feature by tests [ignite-3]

2024-04-19 Thread via GitHub


xtern opened a new pull request, #3635:
URL: https://github.com/apache/ignite-3/pull/3635

   https://issues.apache.org/jira/browse/IGNITE-21940


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] IGNITE-21939 Sql. Cover SQL F302-02(INTERSECT [ALL] table operator) feature by tests. [ignite-3]

2024-04-19 Thread via GitHub


xtern opened a new pull request, #3636:
URL: https://github.com/apache/ignite-3/pull/3636

   https://issues.apache.org/jira/browse/IGNITE-21939


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] IGNITE-22083 Invalidate fragment mapping cache when logical topology changes [ignite-3]

2024-04-19 Thread via GitHub


valepakh opened a new pull request, #3637:
URL: https://github.com/apache/ignite-3/pull/3637

   https://issues.apache.org/jira/browse/IGNITE-22083


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Bump com.github.spotbugs from 6.0.8 to 6.0.12 [ignite-3]

2024-04-19 Thread via GitHub


dependabot[bot] opened a new pull request, #3638:
URL: https://github.com/apache/ignite-3/pull/3638

   Bumps com.github.spotbugs from 6.0.8 to 6.0.12.
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.spotbugs=gradle=6.0.8=6.0.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot show  ignore conditions` will show all of 
the ignore conditions of the specified dependency
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Bump net.bytebuddy:byte-buddy from 1.14.12 to 1.14.13 [ignite-3]

2024-04-19 Thread via GitHub


dependabot[bot] opened a new pull request, #3639:
URL: https://github.com/apache/ignite-3/pull/3639

   Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 
1.14.12 to 1.14.13.
   
   Release notes
   Sourced from https://github.com/raphw/byte-buddy/releases;>net.bytebuddy:byte-buddy's 
releases.
   
   Byte Buddy 1.14.13
   
   Avoid resolving type variables when generic type processing is 
disabled.
   Improve error message for Byte Buddy agent external attach.
   Fix build for modular jars when using later version than Java 8.
   
   
   
   
   Commits
   
   https://github.com/raphw/byte-buddy/commit/93cee8f4b5f5be74e6026f322d622003d71c3558;>93cee8f
 [maven-release-plugin] prepare release byte-buddy-1.14.13
   https://github.com/raphw/byte-buddy/commit/8236faebb45f08ecde6ea00bb201f1fd4a0fc419;>8236fae
 [release] Release new version
   https://github.com/raphw/byte-buddy/commit/5ce63525e4126369bf66f81c555f01feea2d5794;>5ce6352
 Remove test that cannot run in context.
   https://github.com/raphw/byte-buddy/commit/53ce259455858e931b165851dbd82bf5942baf12;>53ce259
 Legger inn type vitness.
   https://github.com/raphw/byte-buddy/commit/09dc1a9d65893107fc43ef2951b8b502eb946b04;>09dc1a9
 Don't resolve parameterized types for RAW_TYPES mode (https://redirect.github.com/raphw/byte-buddy/issues/1604;>#1604)
   https://github.com/raphw/byte-buddy/commit/ddc76989a35bab0cee0bb51b8444bbf80d074445;>ddc7698
 Improve error message.
   https://github.com/raphw/byte-buddy/commit/3b4ed21c97a960ddd8196cdd76c62810f9a6cfd2;>3b4ed21
 Increment internal Byte Buddy.
   https://github.com/raphw/byte-buddy/commit/db916989d405341726be2981297fc257f0c669c0;>db91698
 Bump org.apache.commons:commons-compress in /byte-buddy-maven-plugin (https://redirect.github.com/raphw/byte-buddy/issues/1597;>#1597)
   https://github.com/raphw/byte-buddy/commit/7841ebc8cd286a7240d7b1ac059be686e5e08673;>7841ebc
 Avoid broken modular jars when using the shade plugin where the jar tool is 
r...
   https://github.com/raphw/byte-buddy/commit/76987df2de9886e356eeacfd7b79d447d35405e6;>76987df
 Add main class.
   Additional commits viewable in https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13;>compare
 view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=net.bytebuddy:byte-buddy=gradle=1.14.12=1.14.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot show  ignore conditions` will show all of 
the ignore conditions of the specified dependency
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-18647 Sql. Implement missed Statement and StatementBuilder methods. [ignite-3]

2024-04-19 Thread via GitHub


ygerzhedovich commented on code in PR #3626:
URL: https://github.com/apache/ignite-3/pull/3626#discussion_r1572234816


##
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/threading/ItSqlApiThreadingTest.java:
##
@@ -135,7 +125,9 @@ void 
asyncResultSetFuturesCompleteInContinuationsPool(AsyncResultSetAsyncOperati
 
 private static AsyncResultSet fetchFirstPage(IgniteSql igniteSql)
 throws InterruptedException, ExecutionException, TimeoutException {
-return igniteSql.executeAsync(null, SELECT_QUERY).get(10, SECONDS);
+Statement statement = 
igniteSql.statementBuilder().query(SELECT_QUERY).pageSize(1).build();

Review Comment:
   it will be worth mentioning why we use page size 1 and it matters



##
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/api/ItSqlClientMetricsTest.java:
##
@@ -119,10 +118,10 @@ public void testErroneousFlow() throws Exception {
 }
 
 private void assertMetricValue(MetricSet metricSet, String metricName, 
Object expectedValue) throws InterruptedException {
-assertTrue(
-waitForCondition(
-() -> 
expectedValue.toString().equals(metricSet.get(metricName).getValueAsString()),
-1000)
-);
+waitForCondition(
+() -> 
expectedValue.toString().equals(metricSet.get(metricName).getValueAsString()),
+1000);
+
+assertEquals(expectedValue.toString(), 
metricSet.get(metricName).getValueAsString());

Review Comment:
   It's a matter of taste, but I liked the previous version better



##
modules/api/src/main/java/org/apache/ignite/sql/Statement.java:
##
@@ -125,13 +105,6 @@ interface StatementBuilder {
  */
 StatementBuilder defaultSchema(String schema);
 
-/**
- * Returns a page size - the maximum number of result rows that can be 
fetched at a time.
- *
- * @return Maximum number of rows per page.
- */
-int pageSize();
-
 /**
  * Sets a page size - the maximum number of result rows that can be 
fetched at a time.

Review Comment:
   seem need to mention which possible values here. Like 0 - will be used 
default. Can't be negative...



##
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/api/ItSqlAsynchronousApiTest.java:
##
@@ -68,18 +65,13 @@ public void pageSequence() {
 var p0 = ars0.currentPage();
 AsyncResultSet ars1 = await(ars0.fetchNextPage());
 var p1 = ars1.currentPage();
-AsyncResultSet ars2 = 
await(ars1.fetchNextPage().toCompletableFuture());
+AsyncResultSet ars2 = await(ars1.fetchNextPage());
 var p2 = ars2.currentPage();
 AsyncResultSet ars3 = await(ars1.fetchNextPage());
 var p3 = ars3.currentPage();
 AsyncResultSet ars4 = await(ars0.fetchNextPage());
 var p4 = ars4.currentPage();
 
-assertSame(ars0, ars1);
-assertSame(ars0, ars2);
-assertSame(ars0, ars3);
-assertSame(ars0, ars4);

Review Comment:
   can we do the same as already done for other similar parts - implement 
Wrapper interface and use it to get real AsyncResultSet?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on code in PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#discussion_r1572417317


##
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/ExecutionTest.java:
##
@@ -55,14 +57,16 @@
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
+import org.junit.jupiter.params.provider.ValueSource;
 
 /**
  * ExecutionTest.
  * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
  */
 public class ExecutionTest extends AbstractExecutionTest {
-@Test
-public void testSimpleExecution() {
+@ParameterizedTest(name = "join algo : {0}")
+@ValueSource(strings = {"NLJoin", "HashJoin"})
+public void testSimpleExecution(String joinImplementation) {

Review Comment:
   i make some refactoring there



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21720 Sql. Implement hash join [ignite-3]

2024-04-19 Thread via GitHub


zstan commented on PR #3608:
URL: https://github.com/apache/ignite-3/pull/3608#issuecomment-2066643116

   @korlov42 seems i complete with all of your issues


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21156 : Custom metrics introduction - Two IgniteMetrics interfaces [ignite]

2024-04-19 Thread via GitHub


Vladsz83 closed pull request #11221: IGNITE-21156 : Custom metrics introduction 
- Two IgniteMetrics interfaces
URL: https://github.com/apache/ignite/pull/11221


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21156 : Custom metrics introduction - renamins, minimal API [ignite]

2024-04-19 Thread via GitHub


Vladsz83 closed pull request #11216: IGNITE-21156 : Custom metrics introduction 
- renamins, minimal API
URL: https://github.com/apache/ignite/pull/11216


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21156 : [IEP-114] Custom metrics introduction [ignite]

2024-04-19 Thread via GitHub


Vladsz83 closed pull request #11145: IGNITE-21156 : [IEP-114] Custom metrics 
introduction
URL: https://github.com/apache/ignite/pull/11145


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22080 Fix ConflictResolver fails on debug logging [ignite-extensions]

2024-04-19 Thread via GitHub


timoninmaxim merged PR #261:
URL: https://github.com/apache/ignite-extensions/pull/261


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21763 Adjust TxnResourceVacuumTask in order to vacuum persistent txn state [ignite-3]

2024-04-19 Thread via GitHub


sanpwc commented on code in PR #3591:
URL: https://github.com/apache/ignite-3/pull/3591#discussion_r1572498142


##
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##
@@ -406,18 +413,18 @@ private UpdateCommandResult 
handleUpdateAllCommand(UpdateAllCommand cmd, long co
  * Handler for the {@link WriteIntentSwitchCommand}.
  *
  * @param cmd Command.
- * @param commandIndex Index of the RAFT command.
- * @param commandTerm Term of the RAFT command.
+ * @param commandIndex Index of the RAFT cmd.
+ * @param commandTerm Term of the RAFT cmd.
  */
 private void handleWriteIntentSwitchCommand(WriteIntentSwitchCommand cmd, 
long commandIndex, long commandTerm) {
-// Skips the write command because the storage has already executed it.
+// Skips the write cmd because the storage has already executed it.
 if (commandIndex <= storage.lastAppliedIndex()) {
 return;
 }
 
 UUID txId = cmd.txId();
 
-markFinished(txId, cmd.commit(), cmd.commitTimestamp());
+markFinished(txId, cmd.commit(), cmd.commitTimestamp(), null);

Review Comment:
   And why we need it to be present on all nodes of commit partition?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-22054 Fix ItMultipleLocksTest#test [ignite-3]

2024-04-19 Thread via GitHub


sanpwc merged PR #3632:
URL: https://github.com/apache/ignite-3/pull/3632


-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


lowka commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1572613224


##
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/storage/CatalogEntrySerializationTest.java:
##
@@ -144,6 +174,85 @@ void test(MarshallableEntryType type) {
 }
 }
 
+@ParameterizedTest(name = "{0}")
+@MethodSource("values")
+public void constantDefault(ColumnType columnType, Object value) throws 
IOException {
+ConstantValue val = (ConstantValue) DefaultValue.constant(value);
+
+log.info("{}: {}", columnType, value);
+
+try (IgniteUnsafeDataOutput os = new IgniteUnsafeDataOutput(128)) {
+DefaultValue.writeTo(val, os);
+
+try (IgniteUnsafeDataInput in = new 
IgniteUnsafeDataInput(os.internalArray())) {
+DefaultValue actual = DefaultValue.readFrom(in);
+assertEquals(val, actual);
+}
+}
+}
+
+private static Stream values() {
+List list = new ArrayList<>();
+
+list.add(null);
+list.add(RND.nextBoolean());
+
+list.add((byte) RND.nextInt());
+list.add((short) RND.nextInt());
+list.add(RND.nextInt());
+list.add(RND.nextLong());
+list.add((float) RND.nextDouble());
+list.add(RND.nextDouble());
+
+list.add(BigDecimal.valueOf(RND.nextLong()));
+list.add(BigDecimal.valueOf(RND.nextLong(), RND.nextInt(100)));
+
+list.add(BigInteger.valueOf(RND.nextLong()));
+
+list.add(LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(100_000)));
+list.add(LocalDate.of(RND.nextInt(4000) - 1000, RND.nextInt(12) + 1, 
RND.nextInt(27) + 1));
+list.add(LocalDateTime.of(
+LocalDate.of(RND.nextInt(4000) - 1000, RND.nextInt(12) + 1, 
RND.nextInt(27) + 1),
+LocalTime.of(RND.nextInt(24), RND.nextInt(60), 
RND.nextInt(60), RND.nextInt(100_000))
+));
+
+byte[] bytes = new byte[RND.nextInt(1000)];
+RND.nextBytes(bytes);
+list.add(Base64.getEncoder().encodeToString(bytes));
+
+list.add(UUID.randomUUID());
+
+// TODO Include ignored values to test after 
https://issues.apache.org/jira/browse/IGNITE-15200
+//  list.add(Duration.of(11, ChronoUnit.HOURS));
+//  list.add(Period.of(5, 4, 3));
+
+BitSet bitSet = new BitSet();
+for (int i = 0; i < RND.nextInt(100); i++) {
+int b = RND.nextInt(1024);
+bitSet.set(b);
+}
+list.add(bitSet);
+
+return list.stream().map(val -> {
+NativeType nativeType = NativeTypes.fromObject(val);
+return Arguments.of(nativeType == null ? ColumnType.NULL : 
nativeType.spec().asColumnType(), val);
+});
+}
+
+@Test
+public void functionCallDefault() throws IOException{

Review Comment:
   Added prefix.
   



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] IGNITE-21435: Sql. Catalog DefaultValue should not depend on Serializable. [ignite-3]

2024-04-19 Thread via GitHub


lowka commented on code in PR #3627:
URL: https://github.com/apache/ignite-3/pull/3627#discussion_r1572614292


##
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/storage/CatalogEntrySerializationTest.java:
##
@@ -144,6 +174,85 @@ void test(MarshallableEntryType type) {
 }
 }
 
+@ParameterizedTest(name = "{0}")
+@MethodSource("values")
+public void constantDefault(ColumnType columnType, Object value) throws 
IOException {

Review Comment:
   Fixed.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org