You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "zachjsh (via GitHub)" <gi...@apache.org> on 2024/08/08 20:44:45 UTC

[PR] Fix Druid table schema resolution when table defined in catalog and has schema manager (druid)

zachjsh opened a new pull request, #16869:
URL: https://github.com/apache/druid/pull/16869

   ### Description
   
   Previously the Druid schema resolution did not allow for the blending of schemas of those provided by the schema manager, and that computed through the segment metadata cache. Also, previously, the schema manager was preferred over the native Druid catalog when resolving table schemas. This pr fixes these issues, but allowing for the proper blending of schemas provided by the schema manager and that computed through the segment metadata cache. And we now prefer a table schema found in the native Druid catalog to that found in the schema manager.
   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix Druid table schema resolution when table defined in catalog and has schema manager (druid)

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #16869:
URL: https://github.com/apache/druid/pull/16869#discussion_r1710309578


##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.java:
##########
@@ -56,6 +60,11 @@
     return getTables().get(name);
   }
 
+  default DruidTable getTable(String name, BrokerSegmentMetadataCache segmentMetadataCache)

Review Comment:
   ## Useless parameter
   
   The parameter 'segmentMetadataCache' is never used.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/7702)



##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.java:
##########
@@ -56,6 +60,11 @@
     return getTables().get(name);
   }
 
+  default DruidTable getTable(String name, BrokerSegmentMetadataCache segmentMetadataCache)
+  {
+    return getTables().get(name);

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DruidSchemaManager.getTables](1) should be avoided because it has been deprecated.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/1139)



-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix Druid table schema resolution when table defined in catalog and has schema manager (druid)

Posted by "zachjsh (via GitHub)" <gi...@apache.org>.
zachjsh merged PR #16869:
URL: https://github.com/apache/druid/pull/16869


-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org