Back to home page

OSCL-LXR

 
 

    


0001 
0002 -- single row, without table and column alias
0003 select * from values ("one", 1);
0004 
0005 -- single row, without column alias
0006 select * from values ("one", 1) as data;
0007 
0008 -- single row
0009 select * from values ("one", 1) as data(a, b);
0010 
0011 -- single column multiple rows
0012 select * from values 1, 2, 3 as data(a);
0013 
0014 -- three rows
0015 select * from values ("one", 1), ("two", 2), ("three", null) as data(a, b);
0016 
0017 -- null type
0018 select * from values ("one", null), ("two", null) as data(a, b);
0019 
0020 -- int and long coercion
0021 select * from values ("one", 1), ("two", 2L) as data(a, b);
0022 
0023 -- foldable expressions
0024 select * from values ("one", 1 + 0), ("two", 1 + 3L) as data(a, b);
0025 
0026 -- complex types
0027 select * from values ("one", array(0, 1)), ("two", array(2, 3)) as data(a, b);
0028 
0029 -- decimal and double coercion
0030 select * from values ("one", 2.0), ("two", 3.0D) as data(a, b);
0031 
0032 -- error reporting: nondeterministic function rand
0033 select * from values ("one", rand(5)), ("two", 3.0D) as data(a, b);
0034 
0035 -- error reporting: different number of columns
0036 select * from values ("one", 2.0), ("two") as data(a, b);
0037 
0038 -- error reporting: types that are incompatible
0039 select * from values ("one", array(0, 1)), ("two", struct(1, 2)) as data(a, b);
0040 
0041 -- error reporting: number aliases different from number data values
0042 select * from values ("one"), ("two") as data(a, b);
0043 
0044 -- error reporting: unresolved expression
0045 select * from values ("one", random_not_exist_func(1)), ("two", 2) as data(a, b);
0046 
0047 -- error reporting: aggregate expression
0048 select * from values ("one", count(1)), ("two", 2) as data(a, b);
0049 
0050 -- string to timestamp
0051 select * from values (timestamp('1991-12-06 00:00:00.0'), array(timestamp('1991-12-06 01:00:00.0'), timestamp('1991-12-06 12:00:00.0'))) as data(a, b);