Github user hyunsik commented on the pull request:
https://github.com/apache/tajo/pull/621#issuecomment-122719079
Thank you for your comments.
Duplicate and ambiguous are clearly distinguished. Duplicate error will
occur in only add or creation command. For example, ALTER ADD, CREATE TABLE,
CREATE DATABASE will incur duplicate name. Ambiguous occurs in getter method
like ```SELECT FROM...``` and getFunction(). So, there are only three cases
(table, column, and function) for ambiguous errors. Especially, JDBC
specification distinguish both kinds of errors. So, we need them all too.
All methods in ExceptionUtil seems to be used. CatalogExceptionUtil
includes four unused methods.
I'll remove them.
Currently, Tajo is assumed to have only one default database through
planning. So, we should prohibit the removal of ``DEFAULT`` database. To handle
them, in the current implementation, I regard default database and information
schema database as read-only things. So, the attempt to remove ``DEFAULT`` or
``INFORMATION_SCHEMA`` cause ```INSUFFICIENT_PRIVILEGE```. In addition, It can
be easily matched with JDBC errors. Otherwise, we make our own SQLState code.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---