Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 459F2DFDD for ; Wed, 18 Jul 2012 23:49:25 +0000 (UTC) Received: (qmail 3583 invoked by uid 500); 18 Jul 2012 23:49:24 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 3509 invoked by uid 500); 18 Jul 2012 23:49:24 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 3501 invoked by uid 99); 18 Jul 2012 23:49:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 23:49:24 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jamalraihan@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vc0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 23:49:16 +0000 Received: by vcbfl11 with SMTP id fl11so1961980vcb.35 for ; Wed, 18 Jul 2012 16:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=9qsJWcC5/aeP1wk3fWm9aS/zpblS/MxnIxuHG9Kg6p8=; b=RYcPLWGiuuWfTS4hEXQ+eLE2+eMvOvziyXQv5pCJXu6VO3wJMs1hF5NItnb9G5+ayD AfOhkv7OaoMJgADVEfVLMiqv7lFNLMeTSa6mqYKCPdMGYKKEVq0s4uTKrcrPpQxAIVrM 7aHi7d9EBsFw2Hpy1J9SwicG7fBaXk37FeQV4x+6mNKgTu7LYLCDPakzMalPY7aoLZ7L 1X/51jqxUt/7NbFf5xwkB3r8TfLDtPEVSQebYlq0D8K/vMWm02zDea1tSOtOWt21zBX5 Rq+UEZ3xGWfchhqgNrKGGJqgMqjKljG7mNZSiyRxFfterNPTyIytIJztiLXMaJR4vvRI ZRbA== Received: by 10.52.92.70 with SMTP id ck6mr1760393vdb.16.1342655335011; Wed, 18 Jul 2012 16:48:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.11.226 with HTTP; Wed, 18 Jul 2012 16:48:34 -0700 (PDT) From: Raihan Jamal Date: Wed, 18 Jul 2012 16:48:34 -0700 Message-ID: Subject: Difference between timestamp is 15 minutes To: user@hive.apache.org Content-Type: multipart/alternative; boundary=20cf307f308a4c969704c5234ee6 --20cf307f308a4c969704c5234ee6 Content-Type: text/plain; charset=ISO-8859-1 This is the CREATED_TIME *`2012-07-17 00:00:22`* and this is the Corresponding Timestamp *`1342508427000`*. Here timestamp is *5 seconds*more than the *`CREATED_TIME`*. I need to see below scenario Currently I have a query, in which I am joining on created_time and timestamp like this- ON (UNIX_TIMESTAMP(testingtable1.created_time) = (prod_and_ts.timestamps / 1000)) So in above case, it will not match as timestamp is 5 seconds more than created_time. But I need if the difference between either of the two is within 15 minutes then I need to match it. So I need something like this- ON (UNIX_TIMESTAMP(testingtable1.created_time) - (prod_and_ts.timestamps / 1000) = 15 minutes) How I can do the above case if difference between timestamps is within 15 minutes then data will get matched by the above `ON clause` *Raihan Jamal* --20cf307f308a4c969704c5234ee6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
This is the CREATED_TIME `2012-07-17 00:00:22`= and this is the Corresponding Timestamp `1342508427000`. Here times= tamp is 5 seconds more than the `CREATED_TIME`. I need to see= below scenario

Currently I have a query, in which I am joining on crea= ted_time and timestamp like this-

ON (UNIX_TIMESTA= MP(testingtable1.created_time) =3D (prod_and_ts.timestamps / 1000))


So in above case, it will not match as t= imestamp is 5 seconds more than created_time. But I need if the difference = between either of the two is within 15 minutes then I need to match it.

So I need something like this-

ON (UNIX_TIMESTAMP(testingtable1.created_time) - (prod_and_ts.timestamps /= 1000) =3D 15 minutes)

How I can do the above case if difference= between timestamps is within 15 minutes then data will get matched by the = above `ON clause`



Raihan Jamal

--20cf307f308a4c969704c5234ee6--