Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CB2711EBF for ; Fri, 19 Sep 2014 07:12:34 +0000 (UTC) Received: (qmail 62469 invoked by uid 500); 19 Sep 2014 07:12:34 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 62288 invoked by uid 500); 19 Sep 2014 07:12:34 -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 62187 invoked by uid 99); 19 Sep 2014 07:12:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2014 07:12:34 +0000 Date: Fri, 19 Sep 2014 07:12:34 +0000 (UTC) From: "Ravindra Pesala (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-3298) [SQL] registerAsTable / registerTempTable overwrites old tables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-3298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14140124#comment-14140124 ] Ravindra Pesala commented on SPARK-3298: ---------------------------------------- I guess, we should add some API like *SqlContext.isTableExists(tableName)* to check whether the table already exists or not. So by using this API user can check the table existence and then register the table. The current API *SqlContext.table(tableName)* throws exception if the table is not present,so we cannot use it for this purpose. Please comment on it. > [SQL] registerAsTable / registerTempTable overwrites old tables > --------------------------------------------------------------- > > Key: SPARK-3298 > URL: https://issues.apache.org/jira/browse/SPARK-3298 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.0.2 > Reporter: Evan Chan > Priority: Minor > Labels: newbie > > At least in Spark 1.0.2, calling registerAsTable("a") when "a" had been registered before does not cause an error. However, there is no way to access the old table, even though it may be cached and taking up space. > How about at least throwing an error? -- 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