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 3A536D2B9 for ; Sat, 2 Feb 2013 19:21:40 +0000 (UTC) Received: (qmail 65342 invoked by uid 500); 2 Feb 2013 19:21:38 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 65238 invoked by uid 500); 2 Feb 2013 19:21:37 -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 65220 invoked by uid 99); 2 Feb 2013 19:21:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2013 19:21:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of icodesharp@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2013 19:21:29 +0000 Received: by mail-wi0-f172.google.com with SMTP id ez12so1676526wid.11 for ; Sat, 02 Feb 2013 11:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:content-type:content-transfer-encoding:subject :message-id:date:to:mime-version:x-mailer; bh=sikrkaQYATLv9jdI6/bvYdhebXnIxhCl3dFAUqenC7o=; b=kQpCxxY3qt/AmMrwhv7krWHHj+asVbRlXOJiigI4rD1lZdrkbt3o5dxndaA2mxVo/p r0t6ECQM1tam9vUa9/YizR4Es9Ps7SL/J0ZkSBNjixlfE/w8KKdRRoIzsIOb+Ky61Qzk lgBQZ5K82FOeV5EhYOsmyv/GaXuIRN4WuyXl9LV9OOBUEQu3aN1+/CgZ72YNZdIlegJf 8jMq3txJMRFpqow/e1s/qKH9bRR9ZzAZZG5xIJU4l48u8wrwAUZD4THmx3Efg6U3ciEL OZ3yKaunsCEi2VTj53kY63T8ypZkkL3rTX6B5H3WkgKSyJSb3EU2FkQagydFXkCeX/IB Nh7Q== X-Received: by 10.194.235.225 with SMTP id up1mr27911861wjc.11.1359832868570; Sat, 02 Feb 2013 11:21:08 -0800 (PST) Received: from [10.170.201.130] (53509C17.cm-6-1c.dynamic.ziggo.nl. [83.80.156.23]) by mx.google.com with ESMTPS id bd7sm11616608wib.8.2013.02.02.11.21.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Feb 2013 11:21:07 -0800 (PST) From: Martijn van Leeuwen Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Combine multiple row values based upon a condition. Message-Id: Date: Sat, 2 Feb 2013 20:21:08 +0100 To: user@hive.apache.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I new to Apache Hive and I am doing some test to see if it fits my = needs, one of the questions I have if it is possible to "peek" for the = next row in order to find out if the values should be combined. Let me = explain by an example. Let say my data looks like this Id name offset 1 Jan 100 2 Janssen 104 3 Klaas 150 4 Jan 160 5 Janssen 164 An my output to another table should be this Id fullname offsets 1 Jan Janssen [ 100, 160 ] I would like to combine the name values from two rows where the offset = of the two rows are no more then 1 character apart. Is this type of data manipulation is possible and if it is could someone = point me to the right direction hopefully with some explaination? Kind regards Martijn=