Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DEF78200BAC for ; Tue, 11 Oct 2016 22:32:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DDD46160AC3; Tue, 11 Oct 2016 20:32:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 39D34160AF4 for ; Tue, 11 Oct 2016 22:32:23 +0200 (CEST) Received: (qmail 27211 invoked by uid 500); 11 Oct 2016 20:32:21 -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 27020 invoked by uid 99); 11 Oct 2016 20:32:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2016 20:32:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1267A2C4C76 for ; Tue, 11 Oct 2016 20:32:21 +0000 (UTC) Date: Tue, 11 Oct 2016 20:32:21 +0000 (UTC) From: "Dongjoon Hyun (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (SPARK-17857) SHOW TABLES IN schema throws exception if schema doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 11 Oct 2016 20:32:24 -0000 [ https://issues.apache.org/jira/browse/SPARK-17857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dongjoon Hyun closed SPARK-17857. --------------------------------- Resolution: Not A Problem Although the behavior is changed from 1.x, we had better close this issue as 'NOT A PROBLEM' in Spark 2.x. I'm closing this now. You can reopen this if you need to do. > SHOW TABLES IN schema throws exception if schema doesn't exist > -------------------------------------------------------------- > > Key: SPARK-17857 > URL: https://issues.apache.org/jira/browse/SPARK-17857 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.0, 2.0.1 > Reporter: Todd Nemet > Priority: Minor > > SHOW TABLES IN badschema; throws org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException if badschema doesn't exist. In Spark 1.x it would return an empty result set. > On Spark 2.0.1: > {code} > [683|12:45:56] ~/Documents/spark/spark$ bin/beeline -u jdbc:hive2://localhost:10006/ -n hive > Connecting to jdbc:hive2://localhost:10006/ > 16/10/10 12:46:00 INFO jdbc.Utils: Supplied authorities: localhost:10006 > 16/10/10 12:46:00 INFO jdbc.Utils: Resolved authority: localhost:10006 > 16/10/10 12:46:00 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10006/ > Connected to: Spark SQL (version 2.0.1) > Driver: Hive JDBC (version 1.2.1.spark2) > Transaction isolation: TRANSACTION_REPEATABLE_READ > Beeline version 1.2.1.spark2 by Apache Hive > 0: jdbc:hive2://localhost:10006/> show schemas; > +-----------------------+--+ > | databaseName | > +-----------------------+--+ > | default | > | looker_scratch | > | spark_jira | > | spark_looker_scratch | > | spark_looker_test | > +-----------------------+--+ > 5 rows selected (0.61 seconds) > 0: jdbc:hive2://localhost:10006/> show tables in spark_looker_test; > +--------------+--------------+--+ > | tableName | isTemporary | > +--------------+--------------+--+ > | all_types | false | > | order_items | false | > | orders | false | > | users | false | > +--------------+--------------+--+ > 4 rows selected (0.611 seconds) > 0: jdbc:hive2://localhost:10006/> show tables in badschema; > Error: org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database 'badschema' not found; (state=,code=0) > {code} > On Spark 1.6.2: > {code} > [680|12:47:26] ~/Documents/spark/spark$ bin/beeline -u jdbc:hive2://localhost:10005/ -n hive > Connecting to jdbc:hive2://localhost:10005/ > 16/10/10 12:47:29 INFO jdbc.Utils: Supplied authorities: localhost:10005 > 16/10/10 12:47:29 INFO jdbc.Utils: Resolved authority: localhost:10005 > 16/10/10 12:47:30 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10005/ > Connected to: Spark SQL (version 1.6.2) > Driver: Hive JDBC (version 1.2.1.spark2) > Transaction isolation: TRANSACTION_REPEATABLE_READ > Beeline version 1.2.1.spark2 by Apache Hive > 0: jdbc:hive2://localhost:10005/> show schemas; > +--------------------+--+ > | result | > +--------------------+--+ > | default | > | spark_jira | > | spark_looker_test | > | spark_scratch | > +--------------------+--+ > 4 rows selected (0.613 seconds) > 0: jdbc:hive2://localhost:10005/> show tables in spark_looker_test; > +--------------+--------------+--+ > | tableName | isTemporary | > +--------------+--------------+--+ > | all_types | false | > | order_items | false | > | orders | false | > | users | false | > +--------------+--------------+--+ > 4 rows selected (0.575 seconds) > 0: jdbc:hive2://localhost:10005/> show tables in badschema; > +------------+--------------+--+ > | tableName | isTemporary | > +------------+--------------+--+ > +------------+--------------+--+ > No rows selected (0.458 seconds) > {code} > [Relevant part of Hive QL docs|https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-ShowTables] -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org