From issues-return-251681-archive-asf-public=cust-asf.ponee.io@spark.apache.org Tue Apr 21 23:56:06 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B488C18065D for ; Wed, 22 Apr 2020 01:56:05 +0200 (CEST) Received: (qmail 90077 invoked by uid 500); 21 Apr 2020 23:56:05 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 90068 invoked by uid 99); 21 Apr 2020 23:56:05 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2020 23:56:05 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 51BA5E2ED7 for ; Tue, 21 Apr 2020 23:56:04 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id A23D67803DD for ; Tue, 21 Apr 2020 23:56:03 +0000 (UTC) Date: Tue, 21 Apr 2020 23:56:03 +0000 (UTC) From: "philipse (Jira)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (SPARK-31512) make window function using order by optional MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 philipse created SPARK-31512: -------------------------------- Summary: make window function using order by optional Key: SPARK-31512 URL: https://issues.apache.org/jira/browse/SPARK-31512 Project: Spark Issue Type: Improvement Components: SQL Affects Versions: 2.4.5 Environment: spark2.4.5 hadoop2.7.7 Reporter: philipse Hi all In other sql dialect ,order by is not the must when using window function,w= e may make it pararmteterized the below is the case : *select row_number()over() from test1* Error: org.apache.spark.sql.AnalysisException: Window function row_number()= requires window to be ordered, please add ORDER BY clause. For example SEL= ECT row_number()(value_expr) OVER (PARTITION BY window_partition ORDER BY w= indow_ordering) from table; (state=3D,code=3D0) =C2=A0 So. i suggest make it as a choice,or we will meet the error when migrate sq= l from other dialect=EF=BC=8Csuch as hive -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org