From issues-return-158367-archive-asf-public=cust-asf.ponee.io@hive.apache.org Thu May 23 11:48:04 2019 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 A01EE18062F for ; Thu, 23 May 2019 13:48:03 +0200 (CEST) Received: (qmail 8492 invoked by uid 500); 23 May 2019 11:48:01 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 8450 invoked by uid 99); 23 May 2019 11:48:01 -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; Thu, 23 May 2019 11:48:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F04EAE2C15 for ; Thu, 23 May 2019 11:48:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2288625814 for ; Thu, 23 May 2019 11:48:00 +0000 (UTC) Date: Thu, 23 May 2019 11:48:00 +0000 (UTC) From: =?utf-8?Q?Zolt=C3=A1n_Bor=C3=B3k-Nagy_=28JIRA=29?= To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-21782) Cannot use query hints in views MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-21782?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Zolt=C3=A1n Bor=C3=B3k-Nagy updated HIVE-21782: ------------------------------------- Description:=20 Queries against views that contain query hints fail. =C2=A0 {noformat} jdbc:hive2://localhost:11050/default> create view test as select /*+ MAPJOI= N(time_dim) */ count(*) from store_sales join time_dim on (ss_sold_time_sk =3D t_time_sk); jdbc:hive2://localhost:11050/default> explain select * from test; Error: Error while compiling statement: FAILED: SemanticException line 1:32= missing EOF at '(' near 'count' in definition of VIEW test [ select MAPJOIN(time_dim) count(*) from `tpcds`.`store_sales` join `tpcds`.`time_dim` on (`store_sales`.`ss_sold_ti= me_sk` =3D `time_dim`.`t_time_sk`) ] used as test at Line 1:22 (state=3D42000,code=3D40000) {noformat} Explain succeeds on same query but without using a view: {noformat} jdbc:hive2://localhost:11050/default> explain select /*+ MAPJOIN(time_dim) = */ count(*) from store_sales join time_dim on (ss_sold_time_sk =3D t_time_sk);{noformat= } =C2=A0 {noformat} jdbc:hive2://localhost:11050/default> select version(); +----------------------------------------------------+ | _c0 | +----------------------------------------------------+ | 3.1.0.6.0.99.0-147 recc35d355ca45862fcf4a10cb6968a2a1dfad73f | +----------------------------------------------------+ {noformat} The above worked with Hive 2. =C2=A0 was: Queries against views that contain query hints fail. =C2=A0 {noformat} jdbc:hive2://localhost:11050/default> create view test as select /*+ MAPJOI= N(time_dim) */ count(*) from store_sales join time_dim on (ss_sold_time_sk =3D t_time_sk); jdbc:hive2://localhost:11050/default> explain select * from test; Error: Error while compiling statement: FAILED: SemanticException line 1:32= missing EOF at '(' near 'count' in definition of VIEW test [ select MAPJOIN(time_dim) count(*) from `tpcds`.`store_sales` join `tpcds`.`time_dim` on (`store_sales`.`ss_sold_ti= me_sk` =3D `time_dim`.`t_time_sk`) ] used as test at Line 1:22 (state=3D42000,code=3D40000) {noformat} =C2=A0 Explain succeeds on same query but without using a view: {noformat} jdbc:hive2://localhost:11050/default> explain select /*+ MAPJOIN(time_dim) = */ count(*) from store_sales join time_dim on (ss_sold_time_sk =3D t_time_sk);{noformat= } =C2=A0 =C2=A0 {noformat} jdbc:hive2://localhost:11050/default> select version(); +----------------------------------------------------+ | _c0 | +----------------------------------------------------+ | 3.1.0.6.0.99.0-147 recc35d355ca45862fcf4a10cb6968a2a1dfad73f | +----------------------------------------------------+ {noformat} The above worked with Hive 2. =C2=A0 > Cannot use query hints in views > ------------------------------- > > Key: HIVE-21782 > URL: https://issues.apache.org/jira/browse/HIVE-21782 > Project: Hive > Issue Type: Bug > Affects Versions: 3.1.0 > Reporter: Zolt=C3=A1n Bor=C3=B3k-Nagy > Priority: Major > > Queries against views that contain query hints fail. > =C2=A0 > {noformat} > jdbc:hive2://localhost:11050/default> create view test as select /*+ MAPJ= OIN(time_dim) */ count(*) > from store_sales join time_dim on (ss_sold_time_sk =3D t_time_sk); > jdbc:hive2://localhost:11050/default> explain select * from test; > Error: Error while compiling statement: FAILED: SemanticException line 1:= 32 missing EOF at '(' near 'count' in definition of VIEW test [ > select MAPJOIN(time_dim) count(*) from > `tpcds`.`store_sales` join `tpcds`.`time_dim` on (`store_sales`.`ss_sold_= time_sk` =3D `time_dim`.`t_time_sk`) > ] used as test at Line 1:22 (state=3D42000,code=3D40000) > {noformat} > Explain succeeds on same query but without using a view: > {noformat} > jdbc:hive2://localhost:11050/default> explain select /*+ MAPJOIN(time_dim= ) */ count(*) > from store_sales join time_dim on (ss_sold_time_sk =3D t_time_sk);{noform= at} > =C2=A0 > {noformat} > jdbc:hive2://localhost:11050/default> select version(); > +----------------------------------------------------+ > | _c0 | > +----------------------------------------------------+ > | 3.1.0.6.0.99.0-147 recc35d355ca45862fcf4a10cb6968a2a1dfad73f | > +----------------------------------------------------+ > {noformat} > The above worked with Hive 2. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)