From issues-return-195639-archive-asf-public=cust-asf.ponee.io@spark.apache.org Fri Jul 6 07:55:03 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 22CFE180627 for ; Fri, 6 Jul 2018 07:55:02 +0200 (CEST) Received: (qmail 71490 invoked by uid 500); 6 Jul 2018 05:55:02 -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 71480 invoked by uid 99); 6 Jul 2018 05:55:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2018 05:55:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C4012186A5A for ; Fri, 6 Jul 2018 05:55:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id yUAk_aTaJyOV for ; Fri, 6 Jul 2018 05:55:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 038835F42F for ; Fri, 6 Jul 2018 05:55:01 +0000 (UTC) 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 86FB2E00FF for ; Fri, 6 Jul 2018 05:55: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 1A4FF274FA for ; Fri, 6 Jul 2018 05:55:00 +0000 (UTC) Date: Fri, 6 Jul 2018 05:55:00 +0000 (UTC) From: "pin_zhang (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (SPARK-24749) Cannot filter array with named_struct MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 pin_zhang created SPARK-24749: --------------------------------- Summary: Cannot filter array with named_struct Key: SPARK-24749 URL: https://issues.apache.org/jira/browse/SPARK-24749 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 2.3.1 Reporter: pin_zhang 1. Create Table create table arr__int( arr array> )stored as parquet; 2. Insert data insert into arr__int values( array(named_struct('a', 1))); 3. Filter with struct data select * from arr__int where array_contains (arr, named_struct('a', 1)); Error: org.apache.spark.sql.AnalysisException: cannot resolve 'array_contai= ns(arr__int.`arr`, named_struct('a', 1))' due to data type mismatch: Argume= nts must be an array followed by a value of same type as the array members;= line 1 pos 29; 'Project [*] +- 'Filter array_contains(arr#6, named_struct(a, 1)) +- SubqueryAlias arr__int +- Relation[arr#6] parquet (state=3D,code=3D0) Caused by schema null is always false in named_struct=C2=A0 =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org