namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Error messages for repeated DDL statements currently stink #767

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Run the following twice from the web interface after getting the standard 
AsterixDB demo data loaded:

use dataverse TinySocial;

create function InfoFromUser( ) 
{
    for $user in dataset FacebookUsers
    where $user.name = "foo"
    return {  "info": $user }
}

The first time it will succeed and create the function - the second time it 
will error out because it's already created - but the way it will say this to 
the offending user is:  

Failed to insert key since key already exists. [TreeIndexDuplicateKeyException]

This is totally non-intuitive - the system needs to catch the error, which is 
happening at the catalog level, and give the user back a meaningful error 
messages.  There are various ways this could be done - the system could look 
first, or it could just do a blind creation attempt like it does now - but 
either way the desired response is that the error is due to an attempt to 
create something that already exists.

This problem exists for more than just functions....

Original issue reported on code.google.com by dtab...@gmail.com on 5 May 2014 at 10:49

GoogleCodeExporter commented 9 years ago
Issue 766 has been merged into this issue.

Original comment by dtab...@gmail.com on 6 May 2014 at 12:45