drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya <adityakish...@gmail.com>
Subject Re: Custom functions with arbitrary number of arguments + improving physical plan on known cases
Date Mon, 18 Aug 2014 15:55:36 GMT
>
> *Question 1* – how to implement a function with arbitrary arguments
>
> I am trying to implement a function that accepts an arbitrary number of
> arguments, like the following:
>
>
> SELECT * FROM somesource ss
> WHERE foo(ss.a, ss.b, 1, 2, 3, 4)
>
> Foo function will return a boolean.
> How can I have a SimpleFunction accept more than 2 arguments (left and
> right)?
>

​Currently Drill supports Functions with only fixed number of arguments.
You can have more than 2 arguments in a function, just that the number is
fixed when it is defined. We have talked about extending the Drill function
framework to support var-args but no progress have been made.

Could you please let us know what functions do you have in mind which could
use such capability?
​

> *Question 2* - if there's a way to limit the search scope with an heuristic
> (e.g. scan range in a HBase table), how can I hint the runtime or 'affect'
> the physical plan through custom code? Is this possible?
>

Drill can ​automatically convert certain WHERE clauses into sub-range scan
(if the where clause is on 'row_key' column) and/or attach HBase filters to
the scan. Please see [1] and [2].

​[1] https://issues.apache.org/jira/browse/DRILL-571
[2] https://issues.apache.org/jira/browse/DRILL-783

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message