Skip to content
Permalink
Browse files
DRILL-6962: Added tests to verify that coalesce function doesn't thro…
…w exception if use it with non-existing columns. (#550)
  • Loading branch information
agozhiy authored and Agirish committed Mar 18, 2019
1 parent 19bc9ed commit 1ae00d7d3ba06e8e58069d0634d3cd3708beb006
Showing 9 changed files with 47 additions and 0 deletions.
@@ -0,0 +1,5 @@
null
null
null
null
null
@@ -0,0 +1,2 @@
with t as (select coalesce(n_name1, n_name2) c1, c2 from cp.`tpch/nation.parquet`)
select coalesce(c1, c2) from t limit 5;
@@ -0,0 +1,5 @@
ALGERIA
ARGENTINA
BRAZIL
CANADA
EGYPT
@@ -0,0 +1 @@
select coalesce(coalesce(n_name1, n_name2), n_name) from cp.`tpch/nation.parquet` limit 5;
@@ -0,0 +1,5 @@
null
null
null
null
null
@@ -0,0 +1 @@
select coalesce(n_name1, n_name2) from cp.`tpch/nation.parquet` limit 5;
@@ -0,0 +1,5 @@
null
null
null
null
null
@@ -0,0 +1 @@
select coalesce(c1, c2) from (select coalesce(n_name1, n_name2) c1, c2 from cp.`tpch/nation.parquet`) limit 5;
@@ -0,0 +1,22 @@
{
"testId": "coalesce",
"type": "group",
"description": "Tests for coalesce function",
"categories": [
"functional"
],
"matrices": [
{
"query-file": ".*.sql",
"schema": "cp",
"output-format": "tsv",
"expected-file": ".*.e_tsv",
"verification-type": [
"in-memory"
]
}
],
"datasources": [

]
}

0 comments on commit 1ae00d7

Please sign in to comment.