You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "AMashenkov (via GitHub)" <gi...@apache.org> on 2025/01/13 17:04:12 UTC
[PR] IGNITE-24029 Sql schema. Extend Table API with supporting qualified names [ignite-3]
AMashenkov opened a new pull request, #5038:
URL: https://github.com/apache/ignite-3/pull/5038
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-24029 Sql schema. Extend Table API with supporting qualified names [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5038:
URL: https://github.com/apache/ignite-3/pull/5038#discussion_r1923449656
##########
modules/api/src/main/java/org/apache/ignite/compute/BroadcastJobTarget.java:
##########
@@ -72,6 +73,18 @@ static BroadcastJobTarget nodes(Set<ClusterNode> nodes) {
* @return Job target.
*/
static BroadcastJobTarget table(String tableName) {
- return new TableJobTarget(tableName);
+ return table(QualifiedName.parse(tableName));
Review Comment:
should javadoc will be updated regarding what tableName is?
##########
modules/api/src/main/java/org/apache/ignite/compute/BroadcastJobTarget.java:
##########
@@ -72,6 +73,18 @@ static BroadcastJobTarget nodes(Set<ClusterNode> nodes) {
* @return Job target.
*/
static BroadcastJobTarget table(String tableName) {
- return new TableJobTarget(tableName);
+ return table(QualifiedName.parse(tableName));
+ }
+
+ /**
+ * Creates a job target for partitioned execution. For each partition in the provided table the job will be executed on a node that
+ * holds the primary replica.
+ *
+ * @param tableName Table name.
Review Comment:
the same, seems it should be mention not just a table name, but a fully qualified table name together with schema
##########
modules/api/src/main/java/org/apache/ignite/lang/TableNotFoundException.java:
##########
@@ -37,6 +38,15 @@ public TableNotFoundException(String schemaName, String tableName) {
super(TABLE_NOT_FOUND_ERR, "The table does not exist [name=" + canonicalName(schemaName, tableName) + ']');
}
+ /**
+ * Creates an exception with the given table name.
+ *
+ * @param tableName Table name.
+ */
+ public TableNotFoundException(QualifiedName tableName) {
+ super(TABLE_NOT_FOUND_ERR, "The table does not exist [name=" + tableName.toCanonicalForm() + ']');
Review Comment:
can we use the new introduced method for the first constructor?
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogService.java:
##########
@@ -65,24 +65,45 @@ public interface CatalogService extends EventProducer<CatalogEvent, CatalogEvent
@Nullable Catalog catalog(int catalogVersion);
- @Nullable CatalogTableDescriptor table(String tableName, long timestamp);
+ /**
+ * Returns table descriptor by the given schema name and table name at given timestamp.
+ *
+ * @return Table descriptor or {@code null} if table not found.
+ */
+ @Nullable CatalogTableDescriptor table(String schemaName, String tableName, long timestamp);
+ /**
+ * Returns table descriptor by the given table ID and catalog version.
Review Comment:
javadoc is not matched with method signature
##########
modules/platforms/dotnet/Apache.Ignite.Tests/Linq/LinqSqlGenerationTests.cs:
##########
@@ -40,115 +40,115 @@ public partial class LinqSqlGenerationTests
[Test]
public void TestSelectOneColumn() =>
- AssertSql("select _T0.KEY from PUBLIC.tbl1 as _T0", q => q.Select(x => x.Key).ToList());
+ AssertSql("select _T0.KEY from PUBLIC.TBL1 as _T0", q => q.Select(x => x.Key).ToList());
Review Comment:
I don't understand why you changed tablename to uppercase everywhere - SQL is case-insensitive in these cases
--
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-24029 Sql schema. Extend Table API with supporting qualified names [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov commented on code in PR #5038:
URL: https://github.com/apache/ignite-3/pull/5038#discussion_r1925443452
##########
modules/api/src/main/java/org/apache/ignite/compute/BroadcastJobTarget.java:
##########
@@ -72,6 +73,18 @@ static BroadcastJobTarget nodes(Set<ClusterNode> nodes) {
* @return Job target.
*/
static BroadcastJobTarget table(String tableName) {
- return new TableJobTarget(tableName);
+ return table(QualifiedName.parse(tableName));
Review Comment:
Agree.
--
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-24029 Sql schema. Extend Table API with supporting qualified names [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov commented on code in PR #5038:
URL: https://github.com/apache/ignite-3/pull/5038#discussion_r1926596020
##########
modules/platforms/dotnet/Apache.Ignite.Tests/Linq/LinqSqlGenerationTests.cs:
##########
@@ -40,115 +40,115 @@ public partial class LinqSqlGenerationTests
[Test]
public void TestSelectOneColumn() =>
- AssertSql("select _T0.KEY from PUBLIC.tbl1 as _T0", q => q.Select(x => x.Key).ToList());
+ AssertSql("select _T0.KEY from PUBLIC.TBL1 as _T0", q => q.Select(x => x.Key).ToList());
Review Comment:
Here, the expected string is 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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24029 Sql schema. Extend Table API with supporting qualified names [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov commented on code in PR #5038:
URL: https://github.com/apache/ignite-3/pull/5038#discussion_r1925445126
##########
modules/api/src/main/java/org/apache/ignite/compute/BroadcastJobTarget.java:
##########
@@ -72,6 +73,18 @@ static BroadcastJobTarget nodes(Set<ClusterNode> nodes) {
* @return Job target.
*/
static BroadcastJobTarget table(String tableName) {
- return new TableJobTarget(tableName);
+ return table(QualifiedName.parse(tableName));
+ }
+
+ /**
+ * Creates a job target for partitioned execution. For each partition in the provided table the job will be executed on a node that
+ * holds the primary replica.
+ *
+ * @param tableName Table name.
Review Comment:
Why? The methods accept an object that represents table name.
We don't care how the object was created.
--
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-24029 Sql schema. Extend Table API with supporting qualified names [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov merged PR #5038:
URL: https://github.com/apache/ignite-3/pull/5038
--
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