Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-24029 Sql schema. Extend Table API with supporting qualified names #5038

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AMashenkov
Copy link
Member

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

@AMashenkov AMashenkov force-pushed the ignite-24029 branch 13 times, most recently from 8a5b0a5 to 12199b2 Compare January 20, 2025 13:52
@ptupitsyn ptupitsyn self-requested a review January 20, 2025 14:03
@AMashenkov AMashenkov force-pushed the ignite-24029 branch 4 times, most recently from 89fd016 to 8bb2115 Compare January 20, 2025 22:41
@AMashenkov AMashenkov requested a review from isapego January 21, 2025 08:29
Copy link
Contributor

@ptupitsyn ptupitsyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public API changes and .NET changes look good to me.

@@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should javadoc will be updated regarding what tableName is?

* 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same, seems it should be mention not just a table name, but a fully qualified table name together with schema

* @param tableName Table name.
*/
public TableNotFoundException(QualifiedName tableName) {
super(TABLE_NOT_FOUND_ERR, "The table does not exist [name=" + tableName.toCanonicalForm() + ']');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the new introduced method for the first constructor?


/**
* Returns table descriptor by the given table ID and catalog version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javadoc is not matched with method signature

@@ -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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you changed tablename to uppercase everywhere - SQL is case-insensitive in these cases

@AMashenkov AMashenkov force-pushed the ignite-24029 branch 2 times, most recently from 5c1be1e to 3de97f3 Compare January 21, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants