You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/07/31 01:43:08 UTC

[GitHub] [incubator-druid] gianm commented on a change in pull request #8197: Add IPv4 druid expressions

gianm commented on a change in pull request #8197: Add IPv4 druid expressions
URL: https://github.com/apache/incubator-druid/pull/8197#discussion_r308982862
 
 

 ##########
 File path: docs/content/misc/math-expr.md
 ##########
 @@ -195,3 +195,11 @@ See javadoc of java.lang.Math for detailed explanation for each function.
 | cartesian_fold(lambda,arr1,arr2,...) | folds a multi argument lambda across the cartesian product of all input arrays. The first arguments of the lambda is the array element and the last is the accumulator, returning a single accumulated value. |
 | any(lambda,arr) | returns 1 if any element in the array matches the lambda expression, else 0 |
 | all(lambda,arr) | returns 1 if all elements in the array matches the lambda expression, else 0 |
+
+
+## IP Address Functions
+| function | description |
+| --- | --- |
+| ipv4address_match(address, subnet [,inclusive]) | Returns 1 if the string or long IP `address` belongs to the `subnet` CIDR notation literal string, else 0. The optional literal boolean `inclusive` parameter indicates whether the network and broadcast IP addresses should be included in the subnet and defaults to `false`. This function is more efficient when operating on IP addresses as longs instead of strings.|
+| ipv4address_parse(address) | Parses string or long into an IPv4 address as a long. Returns null if `address` cannot be represented as an IPv4 address. |
 
 Review comment:
   In "parses string or long", would longs just be passed through unchanged? If so I'd suggest the docs say that. Please also include what formats are supported for strings. (Dotted decimal only or are there others?)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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