[ 
https://issues.apache.org/jira/browse/DRILL-4721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15328693#comment-15328693
 ] 

Bridget Bevens commented on DRILL-4721:
---------------------------------------

Cool. I believe so, let me check.

On the datediff, it seems like we have it but never documented? I see at least 
one JIRA around this.
https://issues.apache.org/jira/browse/DRILL-4116

On Mon, Jun 13, 2016 at 1:24 PM, Zelaine Fong <[email protected]> wrote:
Alicia Alvarez recently contributed DRILL-4607.  Is that what you're looking 
for, as far as #2?

-- Zelaine

On Mon, Jun 13, 2016 at 1:15 PM, Neeraja Rentachintala 
<[email protected]> wrote:
A customer of ours is interested in using the following functions in Hive with 
Drill.

I was wondering if they can use these functions as Hive UDFs within Drill. Any 
thoughts on if this is possible. Did anyone try to do this.
Additionally would do we have Drill equivalents for these (I am certain that we 
don't have equivalents for the split ones).

-Neeraja


int
datediff(string enddate, string startdate)
Returns the number of days from startdate to enddate: datediff('2009-03-01', 
'2009-02-27') = 2.
array
split(string str, string pat)
Splits str around pat (pat is a regular expression).
map<string,string>
str_to_map(text[, delimiter1, delimiter2])
Splits text into key-value pairs using two delimiters. Delimiter1 separates 
text into K-V pairs, and Delimiter2 splits each K-V pair. Default delimiters 
are ',' for delimiter1 and '=' for delimiter2.


> Doc "dateDiff" in Drill
> -----------------------
>
>                 Key: DRILL-4721
>                 URL: https://issues.apache.org/jira/browse/DRILL-4721
>             Project: Apache Drill
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Bridget Bevens
>            Assignee: Bridget Bevens
>            Priority: Minor
>
> Fwd: [mapr-tech-qa:12242]Doc "dateDiff" in Drill
> Inbox
> x 
> Neeraja Rentachintala
> 3:32 PM (19 minutes ago)
> to me 
> we should document the datediff function. Cisco was asking about it today.
> ---------- Forwarded message ----------
> From: Bob Rumsby <[email protected]>
> Date: Thu, Aug 20, 2015 at 11:56 AM
> Subject: Re: [mapr-tech-qa:12242] "dateDiff" in Drill
> To: "[email protected]" <[email protected]>
> Yes, it should be. We can fix that.
> Bob
> On Thu, Aug 20, 2015 at 11:46 AM, Joseph Blue <[email protected]> wrote:
> Seems as though functions like datediff should be here:
> https://drill.apache.org/docs/date-time-functions-and-arithmetic/
> On Thu, Aug 20, 2015 at 11:32 AM, Ted Dunning <[email protected]> wrote:
> Joe
> Do you have a suggestion for the docs?  Perhaps a few cross links would make 
> it better?
> Sent from my iPhone
> On Aug 20, 2015, at 5:36, Joseph Blue <[email protected]> wrote:
> OK, duh. Thanks for that. I just went down the wrong path in the 
> documentation. 
> This obviously does exactly what I want.
> On Wed, Aug 19, 2015 at 10:26 PM, Mehant Baid <[email protected]> wrote:
> You can use the datediff function as follows:
>  select datediff(date '2008-2-23', date '2008-1-20') from cp.`employee.json` 
> limit 1;
> +---------+
> | EXPR$0  |
> +---------+
> | 34      |
> +---------+
> Thanks
> Mehant
> On Wed, Aug 19, 2015 at 7:00 PM, Joseph Blue <[email protected]> wrote:
> Want to get the difference between two dates in Drill. I used the AGE 
> function which produces an interval. But I want the answer in days, not 
> months & days. Am I missing something from the documentation?
> select age(cast('2015-01-01' as timestamp),cast('2014-11-30' as timestamp)) 
> from sys.version;
> +---------+
> | EXPR$0  |
> +---------+
> | P1M2D   |
> +---------+
> -- 
> Joseph Blue
> Data Scientist



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to