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 0A5C1176DB for ; Sun, 29 Mar 2015 06:01:05 +0000 (UTC) Received: (qmail 75312 invoked by uid 500); 29 Mar 2015 06:00:04 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 75241 invoked by uid 500); 29 Mar 2015 06:00:04 -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 75231 invoked by uid 99); 29 Mar 2015 06:00:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Mar 2015 06:00:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of leftyleverenz@gmail.com designates 209.85.213.174 as permitted sender) Received: from [209.85.213.174] (HELO mail-ig0-f174.google.com) (209.85.213.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Mar 2015 05:59:39 +0000 Received: by ignm3 with SMTP id m3so54262706ign.0 for ; Sat, 28 Mar 2015 22:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fSnv/ARw8SK8bzC6rOTRQ87+qq7V+aKiqMhcweKFvYI=; b=YNKCsDNskH0zv0zVw0sFXFJ8o8Ko4GFgXtI8ZlVMVxMIgIeKhztBRa9/l2QYa7PJyo ggsy4AHRkdRGnbEUS4PM4njoQHbP+m8q4Gq1jaqz+kidHiDCi8VUfHr2yhzqZQsGayl/ rpS2Kg7fsYLFivOtWEPm3kkZ7R06Y3FEbdAZE53VWObe+ZZWhyvaggOjVYasqHA4n6lR pgXjtjGRWSv5QeEnecDGTHXkC/J3MTfzYWOEC1cSHXB+O3XIfH1yFFOdTsmepfq6Lt/G kJUUztJGTBYvcP2+psjhs0ZDm/KFeb5sYNBLXQRHj314dOa0xn7ZP8UtyH+9/uuodxbt J5GA== MIME-Version: 1.0 X-Received: by 10.42.88.206 with SMTP id d14mr54076302icm.40.1427608732357; Sat, 28 Mar 2015 22:58:52 -0700 (PDT) Received: by 10.42.68.2 with HTTP; Sat, 28 Mar 2015 22:58:52 -0700 (PDT) In-Reply-To: References: <05d701d069b4$c71f6e60$555e4b20$@co.uk> Date: Sun, 29 Mar 2015 01:58:52 -0400 Message-ID: Subject: Re: ORDER BY clause in Hive From: Lefty Leverenz To: user@hive.apache.org Content-Type: multipart/alternative; boundary=90e6ba3fcb835ed85e0512670fe2 X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba3fcb835ed85e0512670fe2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Have you looked at the Hive wiki? Here's the section on ORDER BY . -- Lefty On Sat, Mar 28, 2015 at 9:45 PM, Gopal Vijayaraghavan wrote: > > > SELECT cust_id AS Customer_ID, > > =C5=A0 > > ORDER BY 3 ; > > > You=C2=B9re sorting on a constant (literal value 3). The results are what= you > get when you run a non-stable sort on a constant. > > Cheers, > Gopal > > > --90e6ba3fcb835ed85e0512670fe2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Have you looked at the Hive wiki?=C2=A0 Here's the sec= tion on ORDER BY.

-- Lefty

On Sat, Mar 28, 2015 at 9:45 PM, Gopal Vijay= araghavan <gopalv@apache.org> wrote:

> SELECT cust_id AS Customer_ID,
> =C5=A0
> ORDER BY 3 ;


You=C2=B9re sorting on a constant (literal value 3). The results are what y= ou
get when you run a non-stable sort on a constant.

Cheers,
Gopal



--90e6ba3fcb835ed85e0512670fe2--