incubator-drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Nadeau <jacq...@apache.org>
Subject Re: Dropping Views Throws Unrelated Error
Date Sun, 09 Nov 2014 17:28:51 GMT
Can you please file a JIRA requesting better messaging when attempting to
drop a non-existent view?

thanks,
Jacques

On Sat, Nov 8, 2014 at 10:07 PM, mufy <mufeed.usman@gmail.com> wrote:

> I created the following 2 views on 2 separate schemas.
>
> 0: jdbc:drill:zk=n67:5181> select * from INFORMATION_SCHEMA.`VIEWS`;
> +---------------+--------------+------------+-----------------+
> | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | VIEW_DEFINITION |
> +---------------+--------------+------------+-----------------+
> | DRILL         | dfs.tmp      | case_customer | SELECT `columns`[0],
> `columns`[1] FROM `dfs`.`root`.`cases.csv` |
> | DRILL         | n64.tmp      | case_customer | SELECT `columns`[0],
> `columns`[1] FROM `dfs`.`root`.`cases.csv` |
> +---------------+--------------+------------+-----------------+
> 2 rows selected (0.121 seconds)
>
> Now, being in 'n64.tmp' I drop the following schema. All good.
>
> 0: jdbc:drill:zk=n67:5181> drop view case_customer;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'case_customer' deleted successfully from 'n64.tmp'
> schema |
> +------------+------------+
> 1 row selected (0.135 seconds)
>
> 0: jdbc:drill:zk=n67:5181> select * from INFORMATION_SCHEMA.`VIEWS`;
> +---------------+--------------+------------+-----------------+
> | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | VIEW_DEFINITION |
> +---------------+--------------+------------+-----------------+
> | DRILL         | dfs.tmp      | case_customer | SELECT `columns`[0],
> `columns`[1] FROM `dfs`.`root`.`cases.csv` |
> +---------------+--------------+------------+-----------------+
> 1 row selected (0.145 seconds)
>
> Now, when I try to drop again it should say something like "No view by the
> name case_customer found in the current workspace." Rather it throws the
> below.
>
> 0: jdbc:drill:zk=n67:5181> drop view case_customer;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | false      | Error: Failure while accessing Zookeeper |
> +------------+------------+
> 1 row selected (0.126 seconds)
>
>
> And all good as it should be when executed as below.
>
> 0: jdbc:drill:zk=n67:5181> drop view dfs.tmp.`case_customer`;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'case_customer' deleted successfully from 'dfs.tmp'
> schema |
> +------------+------------+
> 1 row selected (0.11 seconds)
>
> 0: jdbc:drill:zk=n67:5181> select * from INFORMATION_SCHEMA.`VIEWS`;
> +---------------+--------------+------------+-----------------+
> | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | VIEW_DEFINITION |
> +---------------+--------------+------------+-----------------+
> +---------------+--------------+------------+-----------------+
> No rows selected (0.136 seconds)
>
>
> ---
> Mufeed Usman
> My LinkedIn <http://www.linkedin.com/pub/mufeed-usman/28/254/400> | My
> Social Cause <http://www.vision2016.org.in/> | My Blogs : LiveJournal
> <http://mufeed.livejournal.com>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message