You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "zstan (via GitHub)" <gi...@apache.org> on 2025/01/23 12:50:27 UTC
[PR] IGNITE-24033 Sql schema. Extend Compute API with supporting qualified names [ignite-3]
zstan opened a new pull request, #5102:
URL: https://github.com/apache/ignite-3/pull/5102
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-XXXX Change summary where XXXX - 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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24033 Sql schema. Extend Compute API with supporting qualified names [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #5102:
URL: https://github.com/apache/ignite-3/pull/5102#discussion_r1930536953
##########
modules/client/src/test/java/org/apache/ignite/client/ClientComputeTest.java:
##########
@@ -197,10 +197,10 @@ public void testExecuteColocatedThrowsTableNotFoundExceptionWhenTableDoesNotExis
var ex = assertThrows(CompletionException.class,
() -> client.compute().executeAsync(
- JobTarget.colocated("\"bad-tbl\"", key), JobDescriptor.builder("job").build(), null).join());
+ JobTarget.colocated("\"bad_tbl\"", key), JobDescriptor.builder("job").build(), null).join());
Review Comment:
done, 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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24033 Sql schema. Extend Compute API with supporting qualified names [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan merged PR #5102:
URL: https://github.com/apache/ignite-3/pull/5102
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24033 Sql schema. Extend Compute API with supporting qualified names [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov commented on code in PR #5102:
URL: https://github.com/apache/ignite-3/pull/5102#discussion_r1930181599
##########
modules/client/src/test/java/org/apache/ignite/client/ClientComputeTest.java:
##########
@@ -197,10 +197,10 @@ public void testExecuteColocatedThrowsTableNotFoundExceptionWhenTableDoesNotExis
var ex = assertThrows(CompletionException.class,
() -> client.compute().executeAsync(
- JobTarget.colocated("\"bad-tbl\"", key), JobDescriptor.builder("job").build(), null).join());
+ JobTarget.colocated("\"bad_tbl\"", key), JobDescriptor.builder("job").build(), null).join());
Review Comment:
Please revert, or add a test that quoted names work on client and embedded.
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24033 Sql schema. Extend Compute API with supporting qualified names [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #5102:
URL: https://github.com/apache/ignite-3/pull/5102#discussion_r1928825304
##########
modules/api/src/main/java/org/apache/ignite/compute/ColocatedJobTarget.java:
##########
@@ -18,35 +18,36 @@
package org.apache.ignite.compute;
import java.util.Objects;
+import org.apache.ignite.table.QualifiedName;
import org.apache.ignite.table.Tuple;
import org.apache.ignite.table.mapper.Mapper;
import org.jetbrains.annotations.Nullable;
/**
- * Colocated job execution target. Indicates a node that hosts the data for the specified key in the provided table.
+ * Colocated job execution target. Indicates a node that hosts the data for the specified key in the provided {@link QualifiedName}.
*/
public class ColocatedJobTarget implements JobTarget {
- private final String tableName;
+ private final QualifiedName name;
private final Object key;
private final @Nullable Mapper<?> keyMapper;
- ColocatedJobTarget(String tableName, Object key, @Nullable Mapper<?> keyMapper) {
- Objects.requireNonNull(tableName);
+ ColocatedJobTarget(QualifiedName name, Object key, @Nullable Mapper<?> keyMapper) {
+ Objects.requireNonNull(name);
Objects.requireNonNull(key);
if (keyMapper == null && !(key instanceof Tuple)) {
throw new IllegalArgumentException("Key must be an instance of Tuple when keyMapper is not provided.");
}
- this.tableName = tableName;
+ this.name = name;
this.key = key;
this.keyMapper = keyMapper;
}
public String tableName() {
- return tableName;
+ return name.objectName();
Review Comment:
fixed, refactored
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24033 Sql schema. Extend Compute API with supporting qualified names [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #5102:
URL: https://github.com/apache/ignite-3/pull/5102#discussion_r1928246450
##########
modules/client/src/main/java/org/apache/ignite/internal/client/compute/ClientCompute.java:
##########
@@ -215,9 +216,11 @@ private <T, R> CompletableFuture<SubmitResult> submit0(JobTarget target, JobDesc
var mapper = (Mapper<? super Object>) colocatedTarget.keyMapper();
if (mapper != null) {
- return doExecuteColocatedAsync(colocatedTarget.tableName(), colocatedTarget.key(), mapper, descriptor, arg);
+ // need to be fixed after: https://issues.apache.org/jira/browse/IGNITE-24301 Fix Thin client protocol to use schema name
+ return doExecuteColocatedAsync(quoteIfNeeded(colocatedTarget.tableName()), colocatedTarget.key(), mapper, descriptor, arg);
Review Comment:
can`t use "quote" here cause this method processed recursively and appends additional quotation in such a case
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org