br1ghtyang / asterixdb

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

Wierd syntax for INSERT statement??? #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Our current grammar says:

insert into DATASET IDENTIFIER (QUERY);

This seems wierd for two reasons:

1. Why do we need ()'s around the query?  Is this necessary for some reason?  
If not, we should make the ()'s optional - which they presumably already are 
around queries in the grammar.

2. Why do we have two ways of spelling datasets?  I.e., why does this statement 
not have a syntax like:

insert into dataset(DS_NAME_STRING) QUERY;

We should fix one/both of these, I think?

Original issue reported on code.google.com by dtab...@gmail.com on 19 Feb 2012 at 7:00

GoogleCodeExporter commented 8 years ago
AND - why is this one ; terminated when queries are not??!!
(We need to ;-terminate everything for consistency, as mentioned elsewhere.)

Original comment by dtab...@gmail.com on 19 Feb 2012 at 7:02

GoogleCodeExporter commented 8 years ago

Original comment by vinay...@gmail.com on 4 Apr 2012 at 7:26

GoogleCodeExporter commented 8 years ago
Issue 88 has been merged into this issue.

Original comment by dtab...@gmail.com on 4 Apr 2012 at 7:28

GoogleCodeExporter commented 8 years ago

Original comment by dtab...@gmail.com on 19 Dec 2012 at 11:05

GoogleCodeExporter commented 8 years ago
insert into dataset(DS_NAME_STRING) QUERY;
"dataset" is both a keyword in the grammar and a built-in (unnesting) Asterix 
function. Two two forms of usages emanate from this dual nature or anomaly in 
our choice of keywords and function names, allowing overlap. 

When we use dataset('arg') form, we are invoking the function that returns 
tuples from the specified dataset name (argument to the function) one by one.  
In other cases we use dataset as a keyword. 

AND - why is this one ; terminated when queries are not??!!

Our previous decision was to allow ';' at the end of every statement including 
queries BUT not make it mandatory .  This was committed into 
asterix_stabilization. One of the (not so strong) reasons was that we wanted to 
avoid making changes to all existing test cases. If we want to have ";"  as 
mandatory rather than optional, I can go ahead and make the changes.  

Original comment by RamanGro...@gmail.com on 20 Dec 2012 at 12:38

GoogleCodeExporter commented 8 years ago
I would prefer mandated semicolons, but wanted to dodge the test case
impact ... I'd love the change if you want to make it.

statement???

Asterix function. Two two forms of usages emanate from this dual nature or
anomaly in our choice of keywords and function names, allowing overlap.

returns tuples from the specified dataset name (argument to the function)
one by one.  In other cases we use dataset as a keyword.

including queries BUT not make it mandatory .  This was committed into
asterix_stabilization. One of the (not so strong) reasons was that we
wanted to avoid making changes to all existing test cases. If we want to
have ";"  as mandatory rather than optional, I can go ahead and make the
changes.

Original comment by dtab...@gmail.com on 24 Dec 2012 at 7:58

GoogleCodeExporter commented 8 years ago
Also agreed that the function notation for DS access ONLY seems reasonable
for Q's.  If you want to change that mandatorily too...

Original comment by dtab...@gmail.com on 24 Dec 2012 at 8:01

GoogleCodeExporter commented 8 years ago
Fixed in branch - Under Review

Original comment by pouria.p...@gmail.com on 5 Feb 2013 at 7:05

GoogleCodeExporter commented 8 years ago

Original comment by pouria.p...@gmail.com on 8 Mar 2013 at 1:01