Re: [PR] Fixing return type for IPV4 (druid)
soumyava merged PR #15916: URL: https://github.com/apache/druid/pull/15916 -- 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-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org
Re: [PR] Fixing return type for IPV4 (druid)
pranavbhole commented on PR #15916: URL: https://github.com/apache/druid/pull/15916#issuecomment-2034914438 @somu-imply Can we rebase and merge this ? -- 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-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org
Re: [PR] Fixing return type for IPV4 (druid)
somu-imply commented on code in PR #15916: URL: https://github.com/apache/druid/pull/15916#discussion_r1503296413 ## sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv4AddressMatchOperatorConversion.java: ## @@ -49,7 +49,7 @@ public class IPv4AddressMatchOperatorConversion extends DirectOperatorConversion SUBNET_OPERAND ) ) - .returnTypeInference(ReturnTypes.BOOLEAN_NULLABLE) + .returnTypeNullable(SqlTypeName.BOOLEAN) Review Comment: This does not need to be changed as ipv4 even if 2nd arg is null throws a validation exception and does not return null in anyway. So I think it can be left out ## sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv4AddressMatchOperatorConversion.java: ## @@ -49,7 +49,7 @@ public class IPv4AddressMatchOperatorConversion extends DirectOperatorConversion SUBNET_OPERAND ) ) - .returnTypeInference(ReturnTypes.BOOLEAN_NULLABLE) + .returnTypeNullable(SqlTypeName.BOOLEAN) Review Comment: This does not need to be changed as ipv4_match even if 2nd arg is null throws a validation exception and does not return null in anyway. So I think it can be left out -- 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-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org
Re: [PR] Fixing return type for IPV4 (druid)
clintropolis commented on code in PR #15916: URL: https://github.com/apache/druid/pull/15916#discussion_r1501290146 ## sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv4AddressMatchOperatorConversion.java: ## @@ -49,7 +49,7 @@ public class IPv4AddressMatchOperatorConversion extends DirectOperatorConversion SUBNET_OPERAND ) ) - .returnTypeInference(ReturnTypes.BOOLEAN_NULLABLE) + .returnTypeNullable(SqlTypeName.BOOLEAN) Review Comment: actually, why is this wrong? does the method also return null if the subnet argument is not a valid address too? if it does indeed need to change, does ipv6_match also need updated? https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv6AddressMatchOperatorConversion.java#L50 -- 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-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org
Re: [PR] Fixing return type for IPV4 (druid)
clintropolis commented on code in PR #15916: URL: https://github.com/apache/druid/pull/15916#discussion_r1501290146 ## sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv4AddressMatchOperatorConversion.java: ## @@ -49,7 +49,7 @@ public class IPv4AddressMatchOperatorConversion extends DirectOperatorConversion SUBNET_OPERAND ) ) - .returnTypeInference(ReturnTypes.BOOLEAN_NULLABLE) + .returnTypeNullable(SqlTypeName.BOOLEAN) Review Comment: actually, why is this wrong? does the method also return null if the subnet argument is null too? if it does indeed need to change, does ipv6_match also need updated? https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv6AddressMatchOperatorConversion.java#L50 -- 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-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org
Re: [PR] Fixing return type for IPV4 (druid)
clintropolis commented on code in PR #15916: URL: https://github.com/apache/druid/pull/15916#discussion_r1501082850 ## sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/IPv4AddressMatchOperatorConversion.java: ## @@ -49,7 +49,7 @@ public class IPv4AddressMatchOperatorConversion extends DirectOperatorConversion SUBNET_OPERAND ) ) - .returnTypeInference(ReturnTypes.BOOLEAN_NULLABLE) + .returnTypeNullable(SqlTypeName.BOOLEAN) Review Comment: should we add a test for this one too? -- 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-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org