You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "AmatyaAvadhanula (via GitHub)" <gi...@apache.org> on 2023/05/11 03:29:00 UTC

[GitHub] [druid] AmatyaAvadhanula commented on a diff in pull request #14223: Do not allow retention rules to be null

AmatyaAvadhanula commented on code in PR #14223:
URL: https://github.com/apache/druid/pull/14223#discussion_r1190598397


##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataRuleManager.java:
##########
@@ -362,6 +325,12 @@ public List<Rule> getRulesWithDefault(final String dataSource)
   @Override
   public boolean overrideRule(final String dataSource, final List<Rule> newRules, final AuditInfo auditInfo)
   {
+    if (newRules == null) {
+      throw new IAE("Rules cannot be null.");
+    } else if (newRules.isEmpty() && config.getDefaultRule().equals(dataSource)) {

Review Comment:
   Could you please explain this condition: `config.getDefaultRule().equals(dataSource)`?



-- 
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