blob: 299730fdf3787a1540815e7017fe4080762ce329 [file] [log] [blame]
-- Automatically generated by SQLQueryTestSuite
-- !query
SELECT mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd')
-- !query schema
struct<mask(AbCD123-@$#, Q, q, d, o):string>
-- !query output
QqQQdddoooo
-- !query
SELECT mask(lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', str => 'AbCD123-@$#')
-- !query schema
struct<mask(AbCD123-@$#, Q, q, d, o):string>
-- !query output
QqQQdddoooo
-- !query
SELECT mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', digitChar => 'd')
-- !query schema
struct<mask(AbCD123-@$#, Q, q, d, NULL):string>
-- !query output
QqQQddd-@$#
-- !query
SELECT mask(lowerChar => 'q', upperChar => 'Q', digitChar => 'd', str => 'AbCD123-@$#')
-- !query schema
struct<mask(AbCD123-@$#, Q, q, d, NULL):string>
-- !query output
QqQQddd-@$#
-- !query
create temporary view t2 as select * from values
('val2a', 6S, 12, 14L, float(15), 20D, 20E2, timestamp '2014-04-04 01:01:00.000', date '2014-04-04'),
('val1b', 10S, 12, 19L, float(17), 25D, 26E2, timestamp '2014-05-04 01:01:00.000', date '2014-05-04'),
('val1b', 8S, 16, 119L, float(17), 25D, 26E2, timestamp '2015-05-04 01:01:00.000', date '2015-05-04'),
('val1c', 12S, 16, 219L, float(17), 25D, 26E2, timestamp '2016-05-04 01:01:00.000', date '2016-05-04'),
('val1b', null, 16, 319L, float(17), 25D, 26E2, timestamp '2017-05-04 01:01:00.000', null),
('val2e', 8S, null, 419L, float(17), 25D, 26E2, timestamp '2014-06-04 01:01:00.000', date '2014-06-04'),
('val1f', 19S, null, 519L, float(17), 25D, 26E2, timestamp '2014-05-04 01:01:00.000', date '2014-05-04'),
('val1b', 10S, 12, 19L, float(17), 25D, 26E2, timestamp '2014-06-04 01:01:00.000', date '2014-06-04'),
('val1b', 8S, 16, 19L, float(17), 25D, 26E2, timestamp '2014-07-04 01:01:00.000', date '2014-07-04'),
('val1c', 12S, 16, 19L, float(17), 25D, 26E2, timestamp '2014-08-04 01:01:00.000', date '2014-08-05'),
('val1e', 8S, null, 19L, float(17), 25D, 26E2, timestamp '2014-09-04 01:01:00.000', date '2014-09-04'),
('val1f', 19S, null, 19L, float(17), 25D, 26E2, timestamp '2014-10-04 01:01:00.000', date '2014-10-04'),
('val1b', null, 16, 19L, float(17), 25D, 26E2, timestamp '2014-05-04 01:01:00.000', null)
as t2(t2a, t2b, t2c, t2d, t2e, t2f, t2g, t2h, t2i)
-- !query schema
struct<>
-- !query output
-- !query
SELECT hex(count_min_sketch(t2d, seed => 1, epsilon => 0.5d, confidence => 0.5d)) FROM t2
-- !query schema
struct<hex(count_min_sketch(t2d, 0.5, 0.5, 1)):string>
-- !query output
00000001000000000000000D0000000100000004000000005D8D6AB90000000000000002000000000000000700000000000000010000000000000003
-- !query
SELECT hex(count_min_sketch(seed => 1, epsilon => 0.5d, confidence => 0.5d, column => t2d)) FROM t2
-- !query schema
struct<hex(count_min_sketch(t2d, 0.5, 0.5, 1)):string>
-- !query output
00000001000000000000000D0000000100000004000000005D8D6AB90000000000000002000000000000000700000000000000010000000000000003
-- !query
SELECT hex(count_min_sketch(t2d, 0.5d, seed => 1, confidence => 0.5d)) FROM t2
-- !query schema
struct<hex(count_min_sketch(t2d, 0.5, 0.5, 1)):string>
-- !query output
00000001000000000000000D0000000100000004000000005D8D6AB90000000000000002000000000000000700000000000000010000000000000003
-- !query
SELECT * FROM explode(collection => array(1, 2))
-- !query schema
struct<col:int>
-- !query output
1
2
-- !query
SELECT * FROM explode_outer(collection => map('a', 1, 'b', 2))
-- !query schema
struct<key:string,value:int>
-- !query output
a 1
b 2
-- !query
SELECT * FROM explode(array(1, 2)), explode(array(3, 4))
-- !query schema
struct<col:int,col:int>
-- !query output
1 3
1 4
2 3
2 4
-- !query
SELECT * FROM explode(array(1, 2)) AS t, LATERAL explode(array(3 * t.col, 4 * t.col))
-- !query schema
struct<col:int,col:int>
-- !query output
1 3
1 4
2 6
2 8
-- !query
SELECT num, val, 'Spark' FROM explode(map(1, 'a', 2, 'b')) AS t(num, val)
-- !query schema
struct<num:int,val:string,Spark:string>
-- !query output
1 a Spark
2 b Spark
-- !query
SELECT * FROM explode(collection => explode(array(1)))
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "UNSUPPORTED_GENERATOR.NESTED_IN_EXPRESSIONS",
"sqlState" : "42K0E",
"messageParameters" : {
"expression" : "\"explode(explode(array(1)))\""
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 15,
"stopIndex" : 54,
"fragment" : "explode(collection => explode(array(1)))"
} ]
}
-- !query
SELECT * FROM explode(collection => explode(collection => array(1)))
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "UNSUPPORTED_GENERATOR.NESTED_IN_EXPRESSIONS",
"sqlState" : "42K0E",
"messageParameters" : {
"expression" : "\"explode(explode(array(1)))\""
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 15,
"stopIndex" : 68,
"fragment" : "explode(collection => explode(collection => array(1)))"
} ]
}
-- !query
CREATE OR REPLACE TEMPORARY VIEW v AS SELECT id FROM range(0, 8)
-- !query schema
struct<>
-- !query output
-- !query
SELECT * FROM explode(collection => TABLE(v))
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.catalyst.ExtendedAnalysisException
{
"errorClass" : "UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY.UNSUPPORTED_TABLE_ARGUMENT",
"sqlState" : "0A000",
"messageParameters" : {
"treeNode" : "'Generate explode(table-argument#x []), false\n: +- SubqueryAlias v\n: +- View (`v`, [id#xL])\n: +- Project [cast(id#xL as bigint) AS id#xL]\n: +- Project [id#xL]\n: +- Range (0, 8, step=1)\n+- OneRowRelation\n"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 37,
"stopIndex" : 44,
"fragment" : "TABLE(v)"
} ]
}
-- !query
SELECT mask(lowerChar => 'q', 'AbCD123-@$#', upperChar => 'Q', otherChar => 'o', digitChar => 'd')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "UNEXPECTED_POSITIONAL_ARGUMENT",
"sqlState" : "4274K",
"messageParameters" : {
"functionName" : "`mask`",
"parameterName" : "`lowerChar`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 98,
"fragment" : "mask(lowerChar => 'q', 'AbCD123-@$#', upperChar => 'Q', otherChar => 'o', digitChar => 'd')"
} ]
}
-- !query
SELECT mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', digitChar => 'e')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT.DOUBLE_NAMED_ARGUMENT_REFERENCE",
"sqlState" : "4274K",
"messageParameters" : {
"functionName" : "`mask`",
"parameterName" : "`digitChar`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 116,
"fragment" : "mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', digitChar => 'e')"
} ]
}
-- !query
SELECT mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', str => 'AbC')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT.BOTH_POSITIONAL_AND_NAMED",
"sqlState" : "4274K",
"messageParameters" : {
"functionName" : "`mask`",
"parameterName" : "`str`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 112,
"fragment" : "mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', str => 'AbC')"
} ]
}
-- !query
SELECT mask(lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "REQUIRED_PARAMETER_NOT_FOUND",
"sqlState" : "4274K",
"messageParameters" : {
"functionName" : "`mask`",
"index" : "0",
"parameterName" : "`str`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 83,
"fragment" : "mask(lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd')"
} ]
}
-- !query
SELECT mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', cellular => 'automata')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "UNRECOGNIZED_PARAMETER_NAME",
"sqlState" : "4274K",
"messageParameters" : {
"argumentName" : "`cellular`",
"functionName" : "`mask`",
"proposal" : "`str` `upperChar` `otherChar`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 122,
"fragment" : "mask('AbCD123-@$#', lowerChar => 'q', upperChar => 'Q', otherChar => 'o', digitChar => 'd', cellular => 'automata')"
} ]
}
-- !query
SELECT encode(str => 'a', charset => 'utf-8')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "NAMED_PARAMETERS_NOT_SUPPORTED",
"sqlState" : "4274K",
"messageParameters" : {
"functionName" : "`encode`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 45,
"fragment" : "encode(str => 'a', charset => 'utf-8')"
} ]
}
-- !query
SELECT mask('AbCD123-@$#', 'Q', 'q', 'd', 'o', 'k')
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
{
"errorClass" : "WRONG_NUM_ARGS.WITHOUT_SUGGESTION",
"sqlState" : "42605",
"messageParameters" : {
"actualNum" : "6",
"docroot" : "https://spark.apache.org/docs/latest",
"expectedNum" : "[1, 2, 3, 4, 5]",
"functionName" : "`mask`"
},
"queryContext" : [ {
"objectType" : "",
"objectName" : "",
"startIndex" : 8,
"stopIndex" : 51,
"fragment" : "mask('AbCD123-@$#', 'Q', 'q', 'd', 'o', 'k')"
} ]
}