-- Automatically generated by SQLQueryTestSuite -- Number of queries: 43 -- !query 0 select null, Null, nUll -- !query 0 schema struct -- !query 0 output NULL NULL NULL -- !query 1 select true, tRue, false, fALse -- !query 1 schema struct -- !query 1 output true true false false -- !query 2 select 1Y -- !query 2 schema struct<1:tinyint> -- !query 2 output 1 -- !query 3 select 127Y, -128Y -- !query 3 schema struct<127:tinyint,-128:tinyint> -- !query 3 output 127 -128 -- !query 4 select 128Y -- !query 4 schema struct<> -- !query 4 output org.apache.spark.sql.catalyst.parser.ParseException Numeric literal 128 does not fit in range [-128, 127] for type tinyint(line 1, pos 7) == SQL == select 128Y -------^^^ -- !query 5 select 1S -- !query 5 schema struct<1:smallint> -- !query 5 output 1 -- !query 6 select 32767S, -32768S -- !query 6 schema struct<32767:smallint,-32768:smallint> -- !query 6 output 32767 -32768 -- !query 7 select 32768S -- !query 7 schema struct<> -- !query 7 output org.apache.spark.sql.catalyst.parser.ParseException Numeric literal 32768 does not fit in range [-32768, 32767] for type smallint(line 1, pos 7) == SQL == select 32768S -------^^^ -- !query 8 select 1L, 2147483648L -- !query 8 schema struct<1:bigint,2147483648:bigint> -- !query 8 output 1 2147483648 -- !query 9 select 9223372036854775807L, -9223372036854775808L -- !query 9 schema struct<9223372036854775807:bigint,-9223372036854775808:bigint> -- !query 9 output 9223372036854775807 -9223372036854775808 -- !query 10 select 9223372036854775808L -- !query 10 schema struct<> -- !query 10 output org.apache.spark.sql.catalyst.parser.ParseException Numeric literal 9223372036854775808 does not fit in range [-9223372036854775808, 9223372036854775807] for type bigint(line 1, pos 7) == SQL == select 9223372036854775808L -------^^^ -- !query 11 select 1, -1 -- !query 11 schema struct<1:int,-1:int> -- !query 11 output 1 -1 -- !query 12 select 2147483647, -2147483648 -- !query 12 schema struct<2147483647:int,-2147483648:int> -- !query 12 output 2147483647 -2147483648 -- !query 13 select 9223372036854775807, -9223372036854775808 -- !query 13 schema struct<9223372036854775807:bigint,-9223372036854775808:bigint> -- !query 13 output 9223372036854775807 -9223372036854775808 -- !query 14 select 9223372036854775808, -9223372036854775809 -- !query 14 schema struct<9223372036854775808:decimal(19,0),-9223372036854775809:decimal(19,0)> -- !query 14 output 9223372036854775808 -9223372036854775809 -- !query 15 select 1234567890123456789012345678901234567890 -- !query 15 schema struct<> -- !query 15 output org.apache.spark.sql.catalyst.parser.ParseException DecimalType can only support precision up to 38 == SQL == select 1234567890123456789012345678901234567890 -- !query 16 select 1234567890123456789012345678901234567890.0 -- !query 16 schema struct<> -- !query 16 output org.apache.spark.sql.catalyst.parser.ParseException DecimalType can only support precision up to 38 == SQL == select 1234567890123456789012345678901234567890.0 -- !query 17 select 1D, 1.2D, 1e10, 1.5e5, .10D, 0.10D, .1e5, .9e+2, 0.9e+2, 900e-1, 9.e+1 -- !query 17 schema struct<1.0:double,1.2:double,1E+10:decimal(1,-10),1.5E+5:decimal(2,-4),0.1:double,0.1:double,1E+4:decimal(1,-4),9E+1:decimal(1,-1),9E+1:decimal(1,-1),90.0:decimal(3,1),9E+1:decimal(1,-1)> -- !query 17 output 1.0 1.2 10000000000 150000 0.1 0.1 10000 90 90 90 90 -- !query 18 select -1D, -1.2D, -1e10, -1.5e5, -.10D, -0.10D, -.1e5 -- !query 18 schema struct<-1.0:double,-1.2:double,-1E+10:decimal(1,-10),-1.5E+5:decimal(2,-4),-0.1:double,-0.1:double,-1E+4:decimal(1,-4)> -- !query 18 output -1.0 -1.2 -10000000000 -150000 -0.1 -0.1 -10000 -- !query 19 select .e3 -- !query 19 schema struct<> -- !query 19 output org.apache.spark.sql.catalyst.parser.ParseException no viable alternative at input 'select .'(line 1, pos 7) == SQL == select .e3 -------^^^ -- !query 20 select 1E309, -1E309 -- !query 20 schema struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)> -- !query 20 output 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -- !query 21 select 0.3, -0.8, .5, -.18, 0.1111, .1111 -- !query 21 schema struct<0.3:decimal(1,1),-0.8:decimal(1,1),0.5:decimal(1,1),-0.18:decimal(2,2),0.1111:decimal(4,4),0.1111:decimal(4,4)> -- !query 21 output 0.3 -0.8 0.5 -0.18 0.1111 0.1111 -- !query 22 select 123456789012345678901234567890123456789e10d, 123456789012345678901234567890123456789.1e10d -- !query 22 schema struct<1.2345678901234568E48:double,1.2345678901234568E48:double> -- !query 22 output 1.2345678901234568E48 1.2345678901234568E48 -- !query 23 select "Hello Peter!", 'hello lee!' -- !query 23 schema struct -- !query 23 output Hello Peter! hello lee! -- !query 24 select 'hello' 'world', 'hello' " " 'lee' -- !query 24 schema struct -- !query 24 output helloworld hello lee -- !query 25 select "hello 'peter'" -- !query 25 schema struct -- !query 25 output hello 'peter' -- !query 26 select 'pattern%', 'no-pattern\%', 'pattern\\%', 'pattern\\\%' -- !query 26 schema struct -- !query 26 output pattern% no-pattern\% pattern\% pattern\\% -- !query 27 select '\'', '"', '\n', '\r', '\t', 'Z' -- !query 27 schema struct<':string,":string, :string, :string, :string,Z:string> -- !query 27 output ' " Z -- !query 28 select '\110\145\154\154\157\041' -- !query 28 schema struct -- !query 28 output Hello! -- !query 29 select '\u0057\u006F\u0072\u006C\u0064\u0020\u003A\u0029' -- !query 29 schema struct -- !query 29 output World :) -- !query 30 select dAte '2016-03-12' -- !query 30 schema struct -- !query 30 output 2016-03-12 -- !query 31 select date 'mar 11 2016' -- !query 31 schema struct<> -- !query 31 output org.apache.spark.sql.catalyst.parser.ParseException Exception parsing DATE(line 1, pos 7) == SQL == select date 'mar 11 2016' -------^^^ -- !query 32 select tImEstAmp '2016-03-11 20:54:00.000' -- !query 32 schema struct -- !query 32 output 2016-03-11 20:54:00 -- !query 33 select timestamp '2016-33-11 20:54:00.000' -- !query 33 schema struct<> -- !query 33 output org.apache.spark.sql.catalyst.parser.ParseException Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff](line 1, pos 7) == SQL == select timestamp '2016-33-11 20:54:00.000' -------^^^ -- !query 34 select interval 13.123456789 seconds, interval -13.123456789 second -- !query 34 schema struct<> -- !query 34 output scala.MatchError (interval 13 seconds 123 milliseconds 456 microseconds,CalendarIntervalType) (of class scala.Tuple2) -- !query 35 select interval 1 year 2 month 3 week 4 day 5 hour 6 minute 7 seconds 8 millisecond, 9 microsecond -- !query 35 schema struct<> -- !query 35 output scala.MatchError (interval 1 years 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds 8 milliseconds,CalendarIntervalType) (of class scala.Tuple2) -- !query 36 select interval 10 nanoseconds -- !query 36 schema struct<> -- !query 36 output org.apache.spark.sql.catalyst.parser.ParseException No interval can be constructed(line 1, pos 16) == SQL == select interval 10 nanoseconds ----------------^^^ -- !query 37 select GEO '(10,-6)' -- !query 37 schema struct<> -- !query 37 output org.apache.spark.sql.catalyst.parser.ParseException Literals of type 'GEO' are currently not supported.(line 1, pos 7) == SQL == select GEO '(10,-6)' -------^^^ -- !query 38 select 90912830918230182310293801923652346786BD, 123.0E-28BD, 123.08BD -- !query 38 schema struct<90912830918230182310293801923652346786:decimal(38,0),1.230E-26:decimal(29,29),123.08:decimal(5,2)> -- !query 38 output 90912830918230182310293801923652346786 0.0000000000000000000000000123 123.08 -- !query 39 select 1.20E-38BD -- !query 39 schema struct<> -- !query 39 output org.apache.spark.sql.catalyst.parser.ParseException DecimalType can only support precision up to 38(line 1, pos 7) == SQL == select 1.20E-38BD -------^^^ -- !query 40 select x'2379ACFe' -- !query 40 schema struct -- !query 40 output #y�� -- !query 41 select X'XuZ' -- !query 41 schema struct<> -- !query 41 output org.apache.spark.sql.catalyst.parser.ParseException contains illegal character for hexBinary: 0XuZ(line 1, pos 7) == SQL == select X'XuZ' -------^^^ -- !query 42 SELECT 3.14, -3.14, 3.14e8, 3.14e-8, -3.14e8, -3.14e-8, 3.14e+8, 3.14E8, 3.14E-8 -- !query 42 schema struct<3.14:decimal(3,2),-3.14:decimal(3,2),3.14E+8:decimal(3,-6),3.14E-8:decimal(10,10),-3.14E+8:decimal(3,-6),-3.14E-8:decimal(10,10),3.14E+8:decimal(3,-6),3.14E+8:decimal(3,-6),3.14E-8:decimal(10,10)> -- !query 42 output 3.14 -3.14 314000000 0.0000000314 -314000000 -0.0000000314 314000000 314000000 0.0000000314