blob: 60da23fe4e2530137ed88265044889651f0c0f20 [file] [log] [blame]
====
---- QUERY
drop database if exists lineage_test_db cascade
====
---- QUERY
create database lineage_test_db
====
---- QUERY
create table lineage_test_db.alltypes like functional_hbase.alltypes
====
---- QUERY
create table lineage_test_db.alltypesnopart like functional.alltypesnopart
====
---- QUERY
create table lineage_test_db.alltypessmall like functional.alltypessmall
====
---- QUERY
create table lineage_test_db.alltypesinsert like functional.alltypesinsert
====
---- LINEAGE
{
"hash": "b0d53e4deafb2467c4108c17667653b5",
"timestamp": 1571508467,
"vertices": [],
"edges": [],
"queryId": "3c45b7f59b52b79b:1b4c7fe800000000",
"user": "anurag",
"queryText": "create table lineage_test_db.foo (id int)",
"endTime": 1571508467
}
---- QUERY
# Test lineage is created for DDLs.
create table lineage_test_db.foo (id int)
====
---- LINEAGE
{
"hash": "6e50d3f5f3b80dd14c5daf6797302f4d",
"timestamp": 1571508472,
"vertices": [],
"edges": [],
"queryId": "f64ecc4d6bfedbd6:a347442700000000",
"user": "anurag",
"queryText": "create external table lineage_test_db.ext_tbl_loc (id int) location '/test-warehouse/lineage_test_db.db/'",
"endTime": 1571508473,
"tableLocation": "hdfs://localhost:20500/test-warehouse/lineage_test_db.db"
}
---- QUERY
# Test location is populated for create external table with location specified.
create external table lineage_test_db.ext_tbl_loc (id int) location
'/test-warehouse/lineage_test_db.db/'
====
---- LINEAGE
{
"hash": "ba35824e6e53501ffd80d9f63e25bfd8",
"timestamp": 1571508478,
"vertices": [],
"edges": [],
"queryId": "8a4711d053812adc:42e4563800000000",
"user": "anurag",
"queryText": "create external table lineage_test_db.ext_tbl (id int)",
"endTime": 1571508478,
"tableLocation": "hdfs://localhost:20500/test-warehouse/lineage_test_db.db/ext_tbl"
}
---- QUERY
# Test location is populated for create external table when location is not specified.
create external table lineage_test_db.ext_tbl (id int)
====
---- LINEAGE
{
"hash": "2560798c9dd478ee73cf5fae27ebb17f",
"timestamp": 1571508483,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.bigint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.bool_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.date_string_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.double_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.float_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.int_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 14,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.month",
"id": 15,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 16,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.smallint_col",
"id": 17,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 18,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.string_col",
"id": 19,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 20,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.timestamp_col",
"id": 21,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 22,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.tinyint_col",
"id": 23,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 24,
"metadata": {
"tableCreateTime": 1571508484,
"tableName": "lineage_test_db.ext_ctas"
}
},
{
"vertexType": "COLUMN",
"vertexId": "lineage_test_db.alltypes.year",
"id": 25,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
9
],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
11
],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [
13
],
"targets": [
12
],
"edgeType": "PROJECTION"
},
{
"sources": [
15
],
"targets": [
14
],
"edgeType": "PROJECTION"
},
{
"sources": [
17
],
"targets": [
16
],
"edgeType": "PROJECTION"
},
{
"sources": [
19
],
"targets": [
18
],
"edgeType": "PROJECTION"
},
{
"sources": [
21
],
"targets": [
20
],
"edgeType": "PROJECTION"
},
{
"sources": [
23
],
"targets": [
22
],
"edgeType": "PROJECTION"
},
{
"sources": [
25
],
"targets": [
24
],
"edgeType": "PROJECTION"
}
],
"queryId": "8d41cd60bf8542c1:7dd8442f00000000",
"user": "anurag",
"queryText": "create external table lineage_test_db.ext_ctas as select * from lineage_test_db.alltypes",
"endTime": 1571508486,
"tableLocation": "hdfs://localhost:20500/test-warehouse/lineage_test_db.db/ext_ctas"
}
---- QUERY
# Test lineage is populate for create external table as select.
create external table lineage_test_db.ext_ctas as select * from lineage_test_db.alltypes
====
---- QUERY
create view lineage_test_db.alltypes_view as select * from lineage_test_db.alltypes
====
---- LINEAGE
{
"hash": "aba4b39bf3c34b5a9ce8fd782acc0a26",
"timestamp": 1571508491,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "x",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1,
2,
3
],
"targets": [
0
],
"edgeType": "PROJECTION"
}
],
"queryId": "c04b5eeb5062b043:03d579a100000000",
"user": "anurag",
"queryText": "select * from ( select tinyint_col + int_col x from functional.alltypes union all select sum(bigint_col) y from (select bigint_col from functional.alltypes) v1) v2",
"endTime": 1571508492
}
---- QUERY
# Simple query to introduce projection dependencies. Shows resolution
# through inline views, unions, and materialization points.
select * from (
select tinyint_col + int_col x from functional.alltypes
union all
select sum(bigint_col) y from (select bigint_col from functional.alltypes) v1) v2
====
---- LINEAGE
{
"hash": "2540c828f7397099c11558544485e97c",
"timestamp": 1571508497,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "sum(a.tinyint_col) OVER(...)",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 2,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.smallint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "count(b.string_col)",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.string_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 6
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.timestamp_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.year",
"id": 9,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.bigint_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.float_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.id",
"id": 12,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
2,
3
],
"targets": [
0
],
"edgeType": "PREDICATE"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
2,
3,
5,
7,
8,
9,
10,
11,
12
],
"targets": [
0,
4,
6
],
"edgeType": "PREDICATE"
}
],
"queryId": "cd4c260544d26311:1955bedb00000000",
"user": "anurag",
"queryText": "select sum(a.tinyint_col) over (partition by a.smallint_col order by a.id), count(b.string_col), b.timestamp_col from functional.alltypes a join functional.alltypessmall b on (a.id = b.id) where a.year = 2010 and b.float_col > 0 group by a.tinyint_col, a.smallint_col, a.id, b.string_col, b.timestamp_col, b.bigint_col having count(a.int_col) > 10 order by b.bigint_col limit 10",
"endTime": 1571508498
}
---- QUERY
# Simple query to introduce predicate dependencies. Shows conjuncts in WHERE, ON, and
# HAVING clause, as well dependencies introduced by GROUP BY and ORDER BY clauses and
# analytic functions.
select sum(a.tinyint_col) over (partition by a.smallint_col order by a.id),
count(b.string_col), b.timestamp_col
from functional.alltypes a join functional.alltypessmall b on (a.id = b.id)
where a.year = 2010 and b.float_col > 0
group by a.tinyint_col, a.smallint_col, a.id, b.string_col, b.timestamp_col, b.bigint_col
having count(a.int_col) > 10
order by b.bigint_col limit 10
====
---- LINEAGE
{
"hash": "b9d4145e873d7ee55e485690a6465421",
"timestamp": 1571508503,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 0,
"metadata": {
"tableCreateTime": 1571508503,
"tableName": "lineage_test_db.lineage_test_tbl1"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571508503,
"tableName": "lineage_test_db.lineage_test_tbl1"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
}
],
"queryId": "9c459e0c9d036062:da24885800000000",
"user": "anurag",
"queryText": "create table lineage_test_db.lineage_test_tbl1 as select int_col, tinyint_col from functional.alltypes",
"endTime": 1571508504
}
---- QUERY
# CTAS queries
create table lineage_test_db.lineage_test_tbl1 as select int_col, tinyint_col from functional.alltypes
====
---- LINEAGE
{
"hash": "bbd2400879f7304bba4182220c138651",
"timestamp": 1571508509,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 0,
"metadata": {
"tableCreateTime": 1571508509,
"tableName": "lineage_test_db.lineage_test_tbl2"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571508509,
"tableName": "lineage_test_db.lineage_test_tbl2"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.string_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 4,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.year",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.id",
"id": 6,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.month",
"id": 7,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
4,
5,
6,
7
],
"targets": [
0,
2
],
"edgeType": "PREDICATE"
}
],
"queryId": "504006f6c70b4d6d:e4a30bd900000000",
"user": "anurag",
"queryText": "create table lineage_test_db.lineage_test_tbl2 as select distinct a.int_col, a.string_col from functional.alltypes a inner join functional.alltypessmall b on (a.id = b.id) where a.year = 2009 and b.month = 2",
"endTime": 1571508510
}
---- QUERY
create table lineage_test_db.lineage_test_tbl2 as
select distinct a.int_col, a.string_col from functional.alltypes a
inner join functional.alltypessmall b on (a.id = b.id)
where a.year = 2009 and b.month = 2
====
---- LINEAGE
{
"hash": "8f43e2adb3da2eac5d00d1eba96bb553",
"timestamp": 1571508515,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 0,
"metadata": {
"tableCreateTime": 1571508515,
"tableName": "lineage_test_db.lineage_test_tbl3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
}
],
"queryId": "974f555500597d28:867fee2f00000000",
"user": "anurag",
"queryText": "create table lineage_test_db.lineage_test_tbl3 as select * from (select * from (select int_col from functional.alltypestiny limit 1) v1 ) v2",
"endTime": 1571508516
}
---- QUERY
create table lineage_test_db.lineage_test_tbl3 as
select * from
(select * from
(select int_col from functional.alltypestiny limit 1) v1 ) v2
====
---- LINEAGE
{
"hash": "502d2de3774289b12a705777da61baae",
"timestamp": 1571508521,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.bigint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.bool_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.date_string_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.double_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.float_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.int_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 14,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.month",
"id": 15,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 16,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.smallint_col",
"id": 17,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 18,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.string_col",
"id": 19,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 20,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.timestamp_col",
"id": 21,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 22,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.tinyint_col",
"id": 23,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 24,
"metadata": {
"tableCreateTime": 1571508521,
"tableName": "lineage_test_db.lineage_test_tbl4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypes.year",
"id": 25,
"metadata": {
"tableCreateTime": 1571175351,
"tableName": "functional_hbase.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
9
],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
11
],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [
13
],
"targets": [
12
],
"edgeType": "PROJECTION"
},
{
"sources": [
15
],
"targets": [
14
],
"edgeType": "PROJECTION"
},
{
"sources": [
17
],
"targets": [
16
],
"edgeType": "PROJECTION"
},
{
"sources": [
19
],
"targets": [
18
],
"edgeType": "PROJECTION"
},
{
"sources": [
21
],
"targets": [
20
],
"edgeType": "PROJECTION"
},
{
"sources": [
23
],
"targets": [
22
],
"edgeType": "PROJECTION"
},
{
"sources": [
25
],
"targets": [
24
],
"edgeType": "PROJECTION"
}
],
"queryId": "d2439eef44931b51:d82a952600000000",
"user": "anurag",
"queryText": "create table lineage_test_db.lineage_test_tbl4 as select * from functional_hbase.alltypes limit 5",
"endTime": 1571508521
}
---- QUERY
# CTAS from HBase table
create table lineage_test_db.lineage_test_tbl4 as select * from functional_hbase.alltypes limit 5
====
---- LINEAGE
{
"hash": "2fa5d0ab4e1c38a9d7abde595f4c60c8",
"timestamp": 1571508526,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 7,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 12,
"metadata": {
"tableCreateTime": 1571508463,
"tableName": "lineage_test_db.alltypes"
}
}
],
"edges": [
{
"sources": [],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
1
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
3
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
5
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
12
],
"edgeType": "PROJECTION"
}
],
"queryId": "5640f06b844acdfc:d01daab300000000",
"user": "anurag",
"queryText": "insert into lineage_test_db.alltypes values (1, 1, true, \"1999-12-01\", 2.0, 1.0, 1, 12, 2, \"abs\", cast(now() as timestamp), 1, 1999)",
"endTime": 1571508526
}
---- QUERY
# Insert into an HBase table
insert into
lineage_test_db.alltypes
values (1, 1, true, "1999-12-01", 2.0, 1.0, 1, 12, 2, "abs",
cast(now() as timestamp), 1, 1999)
====
---- LINEAGE
{
"hash": "e3af61c7dc3e8cd9ab632c3c935df032",
"timestamp": 1571508531,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bool_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571508464,
"tableName": "lineage_test_db.alltypesnopart"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.timestamp_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
5
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [
13
],
"targets": [
12
],
"edgeType": "PROJECTION"
}
],
"queryId": "604902011a1d8e57:a86fb43e00000000",
"user": "anurag",
"queryText": "insert into table lineage_test_db.alltypesnopart (id, bool_col, timestamp_col) select id, bool_col, timestamp_col from functional.alltypes",
"endTime": 1571508532
}
---- QUERY
insert into table lineage_test_db.alltypesnopart (id, bool_col, timestamp_col)
select id, bool_col, timestamp_col
from functional.alltypes
====
---- LINEAGE
{
"hash": "453abb733b2b21ba827f80897fe3b579",
"timestamp": 1571508537,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 0,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 1,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 2,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.smallint_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 14,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.month",
"id": 15,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.year",
"id": 16,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
1
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
3
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
5
],
"edgeType": "PROJECTION"
},
{
"sources": [
8
],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
12
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
13
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
14
],
"edgeType": "PROJECTION"
},
{
"sources": [
15,
16
],
"targets": [
0,
1,
2,
3,
4,
5,
7,
9,
10,
11,
12,
13,
14
],
"edgeType": "PREDICATE"
}
],
"queryId": "ab47e55fbc39a82c:e2ddd64500000000",
"user": "anurag",
"queryText": "insert into table lineage_test_db.alltypessmall (smallint_col, int_col) partition (year=2009, month=04) select smallint_col, int_col from functional.alltypes where year=2009 and month=05",
"endTime": 1571508538
}
---- QUERY
insert into table lineage_test_db.alltypessmall (smallint_col, int_col)
partition (year=2009, month=04)
select smallint_col, int_col
from functional.alltypes
where year=2009 and month=05
====
---- LINEAGE
{
"hash": "b6bcec64b3eace721772f4b1d4e2cb57",
"timestamp": 1571508543,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 0,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_seq_snap.alltypes.year",
"id": 1,
"metadata": {
"tableCreateTime": 1571175280,
"tableName": "functional_seq_snap.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 2,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_seq_snap.alltypes.month",
"id": 3,
"metadata": {
"tableCreateTime": 1571175280,
"tableName": "functional_seq_snap.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 4,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_seq_snap.alltypes.id",
"id": 5,
"metadata": {
"tableCreateTime": 1571175280,
"tableName": "functional_seq_snap.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_seq_snap.alltypes.int_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571175280,
"tableName": "functional_seq_snap.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 14,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 15,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_seq_snap.alltypes.string_col",
"id": 16,
"metadata": {
"tableCreateTime": 1571175280,
"tableName": "functional_seq_snap.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 17,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
10
],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
12
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
13
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
14
],
"edgeType": "PROJECTION"
},
{
"sources": [
16
],
"targets": [
15
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
17
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3
],
"targets": [
0,
2,
4,
6,
7,
8,
9,
11,
12,
13,
14,
15,
17
],
"edgeType": "PREDICATE"
}
],
"queryId": "b944749834207a6e:2af1b52500000000",
"user": "anurag",
"queryText": "insert into table lineage_test_db.alltypessmall (id, string_col, int_col) partition (year, month) select id, string_col, int_col, year, month from functional_seq_snap.alltypes where year=2009 and month>10",
"endTime": 1571508543
}
---- QUERY
insert into table lineage_test_db.alltypessmall (id, string_col, int_col)
partition (year, month)
select id, string_col, int_col, year, month
from functional_seq_snap.alltypes
where year=2009 and month>10
====
---- LINEAGE
{
"hash": "2b82f76becf76311633c26498d9f57d8",
"timestamp": 1571508549,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 0,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 1,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.month",
"id": 2,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 3,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 4,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bool_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.smallint_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 14,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 15,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.float_col",
"id": 16,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 17,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.double_col",
"id": 18,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 19,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.date_string_col",
"id": 20,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 21,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.string_col",
"id": 22,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 23,
"metadata": {
"tableCreateTime": 1571508465,
"tableName": "lineage_test_db.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.timestamp_col",
"id": 24,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.year",
"id": 25,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
2
],
"targets": [
1
],
"edgeType": "PROJECTION"
},
{
"sources": [
4
],
"targets": [
3
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
5
],
"edgeType": "PROJECTION"
},
{
"sources": [
8
],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [
10
],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [
12
],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [
14
],
"targets": [
13
],
"edgeType": "PROJECTION"
},
{
"sources": [
16
],
"targets": [
15
],
"edgeType": "PROJECTION"
},
{
"sources": [
18
],
"targets": [
17
],
"edgeType": "PROJECTION"
},
{
"sources": [
20
],
"targets": [
19
],
"edgeType": "PROJECTION"
},
{
"sources": [
22
],
"targets": [
21
],
"edgeType": "PROJECTION"
},
{
"sources": [
24
],
"targets": [
23
],
"edgeType": "PROJECTION"
},
{
"sources": [
2,
4,
25
],
"targets": [
0,
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23
],
"edgeType": "PREDICATE"
}
],
"queryId": "5e4e1056fd8287ac:0ee1847500000000",
"user": "anurag",
"queryText": "insert into table lineage_test_db.alltypessmall partition (year=2009, month) select min(id), min(bool_col), min(tinyint_col), min(smallint_col), min(int_col), min(bigint_col), min(float_col), min(double_col), min(date_string_col), min(string_col), min(timestamp_col), month from functional.alltypes where year=2009 and month>10 group by month having min(id) > 10",
"endTime": 1571508549
}
---- QUERY
insert into table lineage_test_db.alltypessmall
partition (year=2009, month)
select min(id), min(bool_col), min(tinyint_col), min(smallint_col), min(int_col),
min(bigint_col), min(float_col), min(double_col), min(date_string_col), min(string_col),
min(timestamp_col), month
from functional.alltypes
where year=2009 and month>10
group by month
having min(id) > 10
====
---- LINEAGE
{
"hash": "33162d783545a2bdc1e8a3a95553971f",
"timestamp": 1571508554,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "max(tinyint_col) OVER(...)",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
2
],
"targets": [
0
],
"edgeType": "PREDICATE"
}
],
"queryId": "ca4eb4dcd9be24d8:59f4b26c00000000",
"user": "anurag",
"queryText": "select max(tinyint_col) over(partition by int_col) from functional.alltypes group by int_col, tinyint_col",
"endTime": 1571508554
}
---- QUERY
# Select statements with analytic functions
select
max(tinyint_col) over(partition by int_col)
from functional.alltypes
group by int_col, tinyint_col
====
---- LINEAGE
{
"hash": "4f1ecaaed571d2ed9f09f091f399c311",
"timestamp": 1571508560,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "rank() OVER(...)",
"id": 2
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
1
],
"targets": [
2
],
"edgeType": "PREDICATE"
}
],
"queryId": "bb405c0eac26f5f4:eefbb34a00000000",
"user": "anurag",
"queryText": "select int_col, rank() over(order by int_col) from functional.alltypesagg",
"endTime": 1571508560
}
---- QUERY
select int_col, rank() over(order by int_col) from functional.alltypesagg
====
---- LINEAGE
{
"hash": "83067b3ed65f566ee2a7c97259b3f485",
"timestamp": 1571508565,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "count(a.double_col) OVER(...)",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.double_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.id",
"id": 7,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3
],
"targets": [
4
],
"edgeType": "PREDICATE"
},
{
"sources": [
6,
7
],
"targets": [
0,
2,
4
],
"edgeType": "PREDICATE"
}
],
"queryId": "ae44be2f241c986d:31c15abf00000000",
"user": "anurag",
"queryText": "select a.tinyint_col, a.int_col, count(a.double_col) over(partition by a.tinyint_col order by a.int_col desc rows between 1 preceding and 1 following) from functional.alltypes a inner join functional.alltypessmall b on a.id = b.id order by a.tinyint_col, a.int_col",
"endTime": 1571508566
}
---- QUERY
select a.tinyint_col, a.int_col, count(a.double_col)
over(partition by a.tinyint_col order by a.int_col desc rows between 1 preceding and 1 following)
from functional.alltypes a inner join functional.alltypessmall b on a.id = b.id
order by a.tinyint_col, a.int_col
====
---- LINEAGE
{
"hash": "7bda479e44e923018a8e83435a4e7567",
"timestamp": 1571508571,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.double_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "b",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bool_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a + b",
"id": 7
},
{
"vertexType": "COLUMN",
"vertexId": "double_col + a",
"id": 8
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
3,
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
4
],
"edgeType": "PREDICATE"
},
{
"sources": [
3,
5
],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
7
],
"edgeType": "PREDICATE"
},
{
"sources": [
1,
3
],
"targets": [
8
],
"edgeType": "PROJECTION"
}
],
"queryId": "054bea589253d94c:82fb1bae00000000",
"user": "anurag",
"queryText": "with v2 as (select double_col, count(int_col) over() a, sum(int_col + bigint_col) over(partition by bool_col) b from (select * from functional.alltypes) v1) select double_col, a, b, a + b, double_col + a from v2 order by 2, 3, 4",
"endTime": 1571508571
}
---- QUERY
with v2 as
(select
double_col,
count(int_col) over() a,
sum(int_col + bigint_col) over(partition by bool_col) b
from
(select * from functional.alltypes) v1)
select double_col, a, b, a + b, double_col + a from v2
order by 2, 3, 4
====
---- LINEAGE
{
"hash": "f91d8724a1537af46652415e14f0067e",
"timestamp": 1571508576,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.double_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "b",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bool_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a + b",
"id": 7
},
{
"vertexType": "COLUMN",
"vertexId": "double_col + a",
"id": 8
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
3,
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
4
],
"edgeType": "PREDICATE"
},
{
"sources": [
3,
5
],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
7
],
"edgeType": "PREDICATE"
},
{
"sources": [
1,
3
],
"targets": [
8
],
"edgeType": "PROJECTION"
}
],
"queryId": "a942e08210071938:5a00a1e800000000",
"user": "anurag",
"queryText": "select double_col, a, b, a + b, double_col + a from (select double_col, count(int_col) over() a, sum(int_col + bigint_col) over(partition by bool_col) b from (select * from functional.alltypes) v1) v2 order by 2, 3, 4",
"endTime": 1571508576
}
---- QUERY
select double_col, a, b, a + b, double_col + a from
(select
double_col,
count(int_col) over() a,
sum(int_col + bigint_col) over(partition by bool_col) b
from
(select * from functional.alltypes) v1) v2
order by 2, 3, 4
====
---- LINEAGE
{
"hash": "43098e753e37a70f008726178e10dadf",
"timestamp": 1571508581,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.month",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.year",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.int_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.month",
"id": 6,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
6
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
6
],
"targets": [
0,
2,
4
],
"edgeType": "PREDICATE"
}
],
"queryId": "f340737f0f5a5a7c:e1f8020300000000",
"user": "anurag",
"queryText": "select a.month, a.year, b.int_col, b.month from (select year, month from functional.alltypes union all select year, month from functional.alltypes) a inner join functional.alltypessmall b on (a.month = b.month) where b.month = 1",
"endTime": 1571508582
}
---- QUERY
# Union statements
select a.month, a.year, b.int_col, b.month
from
(select year, month from functional.alltypes
union all
select year, month from functional.alltypes) a
inner join
functional.alltypessmall b
on (a.month = b.month)
where b.month = 1
====
---- LINEAGE
{
"hash": "20cdd5a4921f1d865bcc1f8b984839ae",
"timestamp": 1571508587,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.month",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "t2.int_col + 1",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.month",
"id": 6,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3,
5,
6
],
"targets": [
0,
2,
4
],
"edgeType": "PREDICATE"
}
],
"queryId": "3342a4c38b48f764:9fc9ef0f00000000",
"user": "anurag",
"queryText": "select t1.int_col, t2.month, t2.int_col + 1 from ( select int_col, count(*) from functional.alltypessmall where month = 1 group by int_col having count(*) > 1 order by count(*) desc limit 5 ) t1 join functional.alltypes t2 on (t1.int_col = t2.int_col) where month = 1",
"endTime": 1571508587
}
---- QUERY
# Select statements with inline views
select t1.int_col, t2.month, t2.int_col + 1
from (
select int_col, count(*)
from functional.alltypessmall
where month = 1
group by int_col
having count(*) > 1
order by count(*) desc limit 5
) t1
join functional.alltypes t2 on (t1.int_col = t2.int_col)
where month = 1
====
---- LINEAGE
{
"hash": "1b739655724090be8f3dd8bb018fe536",
"timestamp": 1571508592,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.smallint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.id",
"id": 3,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.tinyint_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 6
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.int_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 8
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.float_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 10
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.string_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.day",
"id": 12,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.month",
"id": 13,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
9
],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
11
],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3,
5,
7,
9,
11,
12,
13
],
"targets": [
0,
2,
4,
6,
8,
10
],
"edgeType": "PREDICATE"
}
],
"queryId": "9f4bf31f2f1c6362:cd7abf3600000000",
"user": "anurag",
"queryText": "select x.smallint_col, x.id, x.tinyint_col, c.id, x.int_col, x.float_col, c.string_col from functional.alltypessmall c join ( select a.smallint_col smallint_col, a.tinyint_col tinyint_col, a.day day, a.int_col int_col, a.month month, b.float_col float_col, b.id id from ( select * from functional.alltypesagg a where month=1 ) a join functional.alltypessmall b on (a.smallint_col = b.id) ) x on (x.tinyint_col = c.id) where x.day=1 and x.int_col > 899 and x.float_col > 4.5 and c.string_col < '7' and x.int_col + x.float_col + cast(c.string_col as float) < 1000",
"endTime": 1571508593
}
---- QUERY
select x.smallint_col, x.id, x.tinyint_col, c.id, x.int_col, x.float_col, c.string_col
from functional.alltypessmall c
join (
select a.smallint_col smallint_col, a.tinyint_col tinyint_col, a.day day,
a.int_col int_col, a.month month, b.float_col float_col, b.id id
from ( select * from functional.alltypesagg a where month=1 ) a
join functional.alltypessmall b on (a.smallint_col = b.id)
) x on (x.tinyint_col = c.id)
where x.day=1
and x.int_col > 899
and x.float_col > 4.5
and c.string_col < '7'
and x.int_col + x.float_col + cast(c.string_col as float) < 1000
====
---- LINEAGE
{
"hash": "b91dd6944864a3c14ecefb697ca95459",
"timestamp": 1571508598,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "c1",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypessmall.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172706,
"tableName": "functional_hbase.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "c2",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypessmall.float_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571172706,
"tableName": "functional_hbase.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "c3",
"id": 4
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3
],
"targets": [
0,
2,
4
],
"edgeType": "PREDICATE"
}
],
"queryId": "104e75ae4804d393:0359fc8000000000",
"user": "anurag",
"queryText": "select c1, c2, c3 from (select c1, c2, c3 from (select int_col c1, sum(float_col) c2, min(float_col) c3 from functional_hbase.alltypessmall group by 1) x order by 2,3 desc limit 5 ) y",
"endTime": 1571508598
}
---- QUERY
select c1, c2, c3
from
(select c1, c2, c3
from
(select int_col c1, sum(float_col) c2, min(float_col) c3
from functional_hbase.alltypessmall
group by 1) x
order by 2,3 desc
limit 5
) y
====
---- LINEAGE
{
"hash": "e59cf0e0de9015036a15df76e9e61c85",
"timestamp": 1571508604,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "c1",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypessmall.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172706,
"tableName": "functional_hbase.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "x2",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypessmall.tinyint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571172706,
"tableName": "functional_hbase.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3
],
"targets": [
0,
2
],
"edgeType": "PREDICATE"
}
],
"queryId": "764b5090c1d0c1bd:c02d06b000000000",
"user": "anurag",
"queryText": "select c1, x2 from ( select c1, min(c2) x2 from ( select c1, c2, c3 from ( select int_col c1, tinyint_col c2, min(float_col) c3 from functional_hbase.alltypessmall group by 1, 2 order by 1,2 limit 1 ) x ) x2 group by c1 ) y order by 2,1 desc limit 0",
"endTime": 1571508604
}
---- QUERY
select c1, x2
from (
select c1, min(c2) x2
from (
select c1, c2, c3
from (
select int_col c1, tinyint_col c2, min(float_col) c3
from functional_hbase.alltypessmall
group by 1, 2
order by 1,2
limit 1
) x
) x2
group by c1
) y
order by 2,1 desc
limit 0
====
---- LINEAGE
{
"hash": "cf15009df42b7aea0f6abaeea3381b85",
"timestamp": 1571508609,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
}
],
"queryId": "a04a81a6265056ed:0b50f93200000000",
"user": "anurag",
"queryText": "select id from functional.view_view",
"endTime": 1571508609
}
---- QUERY
# Views
select id from functional.view_view
====
---- LINEAGE
{
"hash": "5dc06563b62b39278652242034a2a70d",
"timestamp": 1571508614,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PREDICATE"
}
],
"queryId": "db445bcc830329d4:ba5c19a300000000",
"user": "anurag",
"queryText": "select t.id from (select id from functional.alltypes_view) t where t.id < 10",
"endTime": 1571508614
}
---- QUERY
select t.id from (select id from functional.alltypes_view) t
where t.id < 10
====
---- LINEAGE
{
"hash": "c9e45730cafb6910b54eaa5c53dc44b1",
"timestamp": 1571508619,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.string_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.float_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bool_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.id",
"id": 7,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
6,
7
],
"targets": [
0,
2,
4
],
"edgeType": "PREDICATE"
}
],
"queryId": "c74cad8af7ffad25:6e4c9a7a00000000",
"user": "anurag",
"queryText": "select string_col, float_col, bool_col from functional.alltypes where id in (select id from functional.alltypesagg)",
"endTime": 1571508620
}
---- QUERY
# Subqueries
select string_col, float_col, bool_col
from functional.alltypes
where id in
(select id from functional.alltypesagg)
====
---- LINEAGE
{
"hash": "1d2fa8025e9279488af58b5b8dd614d9",
"timestamp": 1571508625,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "1",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.tinyint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.tinyint_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
}
],
"edges": [
{
"sources": [],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
2
],
"targets": [
0
],
"edgeType": "PREDICATE"
}
],
"queryId": "564e0392a35a1590:c102f3f900000000",
"user": "anurag",
"queryText": "select 1 from functional.alltypesagg a where exists (select id, count(int_col) over (partition by bool_col) from functional.alltypestiny b where a.tinyint_col = b.tinyint_col group by id, int_col, bool_col) and tinyint_col < 10",
"endTime": 1571508625
}
---- QUERY
select 1
from functional.alltypesagg a
where exists
(select id, count(int_col) over (partition by bool_col)
from functional.alltypestiny b
where a.tinyint_col = b.tinyint_col
group by id, int_col, bool_col)
and tinyint_col < 10
====
---- LINEAGE
{
"hash": "7e678cde53c9d120a6f79134551a8c41",
"timestamp": 1571508630,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "int_col + 1",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col - 1",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.bool_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.int_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
4,
5,
6
],
"targets": [
0,
2
],
"edgeType": "PREDICATE"
}
],
"queryId": "0e4439be9321f134:66210f4300000000",
"user": "anurag",
"queryText": "select int_col + 1, tinyint_col - 1 from functional.alltypes a where a.int_col < (select max(int_col) from functional.alltypesagg g where g.bool_col = true) and a.bigint_col > 10",
"endTime": 1571508630
}
---- QUERY
select int_col + 1, tinyint_col - 1
from functional.alltypes a
where a.int_col <
(select max(int_col) from functional.alltypesagg g where g.bool_col = true)
and a.bigint_col > 10
====
---- LINEAGE
{
"hash": "a7ab58d90540f28a8dfd69703632ad7a",
"timestamp": 1571508636,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "x",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "y",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
}
],
"queryId": "30433ec4beec363a:3d8db54f00000000",
"user": "anurag",
"queryText": "with t as (select int_col x, bigint_col y from functional.alltypes) select x, y from t",
"endTime": 1571508636
}
---- QUERY
# With clause
with t as (select int_col x, bigint_col y from functional.alltypes) select x, y from t
====
---- LINEAGE
{
"hash": "59c56529d835660a4f776c0edc60ecc1",
"timestamp": 1571508641,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 0,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.year",
"id": 1,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 2,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.month",
"id": 3,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
},
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 4,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.id",
"id": 5,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bool_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "tinyint_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "smallint_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "int_col",
"id": 9,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.int_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
},
{
"vertexType": "COLUMN",
"vertexId": "bigint_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "float_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "double_col",
"id": 13,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "date_string_col",
"id": 14,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "string_col",
"id": 15,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.string_col",
"id": 16,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 17,
"metadata": {
"tableCreateTime": 1571508466,
"tableName": "lineage_test_db.alltypesinsert"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
10
],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
12
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
13
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
14
],
"edgeType": "PROJECTION"
},
{
"sources": [
16
],
"targets": [
15
],
"edgeType": "PROJECTION"
},
{
"sources": [],
"targets": [
17
],
"edgeType": "PROJECTION"
}
],
"queryId": "0d45f5c5a8a417ab:85d11ec200000000",
"user": "anurag",
"queryText": "with t1 as (select * from functional.alltypestiny) insert into lineage_test_db.alltypesinsert (id, int_col, string_col) partition(year, month) select id, int_col, string_col, year, month from t1",
"endTime": 1571508641
}
---- QUERY
with t1 as (select * from functional.alltypestiny)
insert into lineage_test_db.alltypesinsert (id, int_col, string_col) partition(year, month)
select id, int_col, string_col, year, month from t1
====
---- LINEAGE
{
"hash": "36f0326d13fc4d2bd03196549624a15a",
"timestamp": 1571508646,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "lead(a, 1, NULL) OVER(...)",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bigint_col",
"id": 2,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.bool_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 4,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.string_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
2,
3,
4,
5,
6
],
"targets": [
0
],
"edgeType": "PREDICATE"
}
],
"queryId": "dc4337031d719a94:9eddd4c600000000",
"user": "anurag",
"queryText": "select lead(a) over (partition by b order by c) from (select lead(id) over (partition by int_col order by bigint_col) as a, max(id) over (partition by tinyint_col order by int_col) as b, min(int_col) over (partition by string_col order by bool_col) as c from functional.alltypes) v",
"endTime": 1571508647
}
---- QUERY
# Nested analytic functions
select lead(a) over (partition by b order by c)
from
(select lead(id) over (partition by int_col order by bigint_col) as a,
max(id) over (partition by tinyint_col order by int_col) as b,
min(int_col) over (partition by string_col order by bool_col) as c
from functional.alltypes) v
====
---- LINEAGE
{
"hash": "f6683b020d20b90902603bbe7f6635e8",
"timestamp": 1571508652,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508652,
"tableName": "lineage_test_db.lineage_test_view1"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
}
],
"queryId": "b649619dd79a7dab:d67c9f4900000000",
"user": "anurag",
"queryText": "create view lineage_test_db.lineage_test_view1 as select id from functional.alltypestiny",
"endTime": 1571508652
}
---- QUERY
# Create view statement (IMPALA-4219)
create view lineage_test_db.lineage_test_view1 as select id from functional.alltypestiny
====
---- LINEAGE
{
"hash": "d1217e5cde0f930466e6ccfe7c261a53",
"timestamp": 1571508657,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "a",
"id": 0,
"metadata": {
"tableCreateTime": 1571508657,
"tableName": "lineage_test_db.lineage_test_view2"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypessmall.int_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172706,
"tableName": "functional_hbase.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "b",
"id": 2,
"metadata": {
"tableCreateTime": 1571508657,
"tableName": "lineage_test_db.lineage_test_view2"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional_hbase.alltypessmall.tinyint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571172706,
"tableName": "functional_hbase.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3
],
"targets": [
0,
2
],
"edgeType": "PREDICATE"
}
],
"queryId": "f74ccc4de79bace3:ea11d35600000000",
"user": "anurag",
"queryText": "create view lineage_test_db.lineage_test_view2 (a, b) as select c1, x2 from ( select c1, min(c2) x2 from ( select c1, c2, c3 from ( select int_col c1, tinyint_col c2, min(float_col) c3 from functional_hbase.alltypessmall group by 1, 2 order by 1,2 limit 1 ) x ) x2 group by c1 ) y order by 2,1 desc limit 0",
"endTime": 1571508658
}
---- QUERY
# Create view with nested inline views (IMPALA-4219)
create view lineage_test_db.lineage_test_view2 (a, b) as select c1, x2
from (
select c1, min(c2) x2
from (
select c1, c2, c3
from (
select int_col c1, tinyint_col c2, min(float_col) c3
from functional_hbase.alltypessmall
group by 1, 2
order by 1,2
limit 1
) x
) x2
group by c1
) y
order by 2,1 desc
limit 0
====
---- LINEAGE
{
"hash": "7fbb84397e7103b32ee785085027ffcf",
"timestamp": 1571508663,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "a1",
"id": 0,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.smallint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a2",
"id": 2,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.id",
"id": 3,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a3",
"id": 4,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.tinyint_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a4",
"id": 6,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a5",
"id": 7,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.int_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a6",
"id": 9,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.float_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "a7",
"id": 11,
"metadata": {
"tableCreateTime": 1571508663,
"tableName": "lineage_test_db.lineage_test_view3"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.string_col",
"id": 12,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.day",
"id": 13,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypesagg.month",
"id": 14,
"metadata": {
"tableCreateTime": 1571172137,
"tableName": "functional.alltypesagg"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
8
],
"targets": [
7
],
"edgeType": "PROJECTION"
},
{
"sources": [
10
],
"targets": [
9
],
"edgeType": "PROJECTION"
},
{
"sources": [
12
],
"targets": [
11
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
3,
5,
8,
10,
12,
13,
14
],
"targets": [
0,
2,
4,
6,
7,
9,
11
],
"edgeType": "PREDICATE"
}
],
"queryId": "9341dd951689a79a:dbf11b6400000000",
"user": "anurag",
"queryText": "create view lineage_test_db.lineage_test_view3 (a1, a2, a3, a4, a5, a6, a7) as select x.smallint_col, x.id, x.tinyint_col, c.id, x.int_col, x.float_col, c.string_col from functional.alltypessmall c join ( select a.smallint_col smallint_col, a.tinyint_col tinyint_col, a.day day, a.int_col int_col, a.month month, b.float_col float_col, b.id id from ( select * from functional.alltypesagg a where month=1 ) a join functional.alltypessmall b on (a.smallint_col = b.id) ) x on (x.tinyint_col = c.id) where x.day=1 and x.int_col > 899 and x.float_col > 4.5 and c.string_col < '7' and x.int_col + x.float_col + cast(c.string_col as float) < 1000",
"endTime": 1571508663
}
---- QUERY
# Create view with complex select statement (IMPALA-4219)
create view lineage_test_db.lineage_test_view3 (a1, a2, a3, a4, a5, a6, a7) as
select x.smallint_col, x.id, x.tinyint_col, c.id, x.int_col, x.float_col, c.string_col
from functional.alltypessmall c
join (
select a.smallint_col smallint_col, a.tinyint_col tinyint_col, a.day day,
a.int_col int_col, a.month month, b.float_col float_col, b.id id
from ( select * from functional.alltypesagg a where month=1 ) a
join functional.alltypessmall b on (a.smallint_col = b.id)
) x on (x.tinyint_col = c.id)
where x.day=1
and x.int_col > 899
and x.float_col > 4.5
and c.string_col < '7'
and x.int_col + x.float_col + cast(c.string_col as float) < 1000
====
---- LINEAGE
{
"hash": "80ed48e4969ac7e03d08d5eb6600f4bf",
"timestamp": 1571508668,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "_c0",
"id": 0,
"metadata": {
"tableCreateTime": 1571508668,
"tableName": "lineage_test_db.lineage_test_view4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.tinyint_col",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 2,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.smallint_col",
"id": 3,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "_c1",
"id": 4,
"metadata": {
"tableCreateTime": 1571508668,
"tableName": "lineage_test_db.lineage_test_view4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.string_col",
"id": 5,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "timestamp_col",
"id": 6,
"metadata": {
"tableCreateTime": 1571508668,
"tableName": "lineage_test_db.lineage_test_view4"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.timestamp_col",
"id": 7,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.int_col",
"id": 8,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.year",
"id": 9,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.bigint_col",
"id": 10,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.float_col",
"id": 11,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypessmall.id",
"id": 12,
"metadata": {
"tableCreateTime": 1571172085,
"tableName": "functional.alltypessmall"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
2,
3
],
"targets": [
0
],
"edgeType": "PREDICATE"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
2,
3,
5,
7,
8,
9,
10,
11,
12
],
"targets": [
0,
4,
6
],
"edgeType": "PREDICATE"
}
],
"queryId": "ab49fdda00d2153e:43e77eb700000000",
"user": "anurag",
"queryText": "create view lineage_test_db.lineage_test_view4 as select * from ( select sum(a.tinyint_col) over (partition by a.smallint_col order by a.id), count(b.string_col), b.timestamp_col from functional.alltypes a join functional.alltypessmall b on (a.id = b.id) where a.year = 2010 and b.float_col > 0 group by a.tinyint_col, a.smallint_col, a.id, b.string_col, b.timestamp_col, b.bigint_col having count(a.int_col) > 10 order by b.bigint_col limit 10) t",
"endTime": 1571508669
}
---- QUERY
# Create view with select statement containing an analytic function (IMPALA-4219)
create view lineage_test_db.lineage_test_view4 as
select * from (
select sum(a.tinyint_col) over (partition by a.smallint_col order by a.id),
count(b.string_col), b.timestamp_col
from functional.alltypes a join functional.alltypessmall b on (a.id = b.id)
where a.year = 2010 and b.float_col > 0
group by a.tinyint_col, a.smallint_col, a.id, b.string_col, b.timestamp_col, b.bigint_col
having count(a.int_col) > 10
order by b.bigint_col limit 10) t
====
---- LINEAGE
{
"hash": "561916b21b73cf61397e1ca9aa2fb682",
"timestamp": 1571508674,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508491,
"tableName": "lineage_test_db.alltypes_view"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypestiny.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571172091,
"tableName": "functional.alltypestiny"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
}
],
"queryId": "80476e74195f4624:2391cdd800000000",
"user": "anurag",
"queryText": "alter view lineage_test_db.alltypes_view as select id from functional.alltypestiny",
"endTime": 1571508674
}
---- QUERY
# Alter view statement (IMPALA-4219)
alter view lineage_test_db.alltypes_view as select id from functional.alltypestiny
====
---- LINEAGE
{
"hash": "e771fd2a8795e5aaad3e86c266b9a039",
"timestamp": 1571508679,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "x",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.complex_struct_col.f1",
"id": 1,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_struct_col.f1",
"id": 2,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_struct_col.f2",
"id": 3,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.nested_struct_col.f2.f12.f21",
"id": 4,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.year",
"id": 5,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
}
],
"edges": [
{
"sources": [
1,
2,
3
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
4,
5
],
"targets": [
0
],
"edgeType": "PREDICATE"
}
],
"queryId": "1e4e184fe1e92114:278af40100000000",
"user": "anurag",
"queryText": "select * from ( select int_struct_col.f1 + int_struct_col.f2 x from functional.allcomplextypes where year = 2000 order by nested_struct_col.f2.f12.f21 limit 10 union all select sum(f1) y from (select complex_struct_col.f1 f1 from functional.allcomplextypes group by 1) v1) v2",
"endTime": 1571508679
}
---- QUERY
# Test references to struct fields.
select * from (
select int_struct_col.f1 + int_struct_col.f2 x from functional.allcomplextypes
where year = 2000
order by nested_struct_col.f2.f12.f21 limit 10
union all
select sum(f1) y from
(select complex_struct_col.f1 f1 from functional.allcomplextypes
group by 1) v1) v2
====
---- LINEAGE
{
"hash": "63df7e3a395b2f9d56928ccd655edef5",
"timestamp": 1571508684,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "item",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_array_col.item",
"id": 1,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "key",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.key",
"id": 3,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "f1",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.value.f1",
"id": 5,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "f2",
"id": 6
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.value.f2",
"id": 7,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
5
],
"targets": [
0,
2,
4,
6
],
"edgeType": "PREDICATE"
}
],
"queryId": "154d1807a8d2a566:a6f7b3b500000000",
"user": "anurag",
"queryText": "select * from functional.allcomplextypes.int_array_col a inner join functional.allcomplextypes.struct_map_col m on (a.item = m.f1)",
"endTime": 1571508685
}
---- QUERY
# Test absolute collection table refs. Ensure that the vertex ids of sources are
# always an absolute explicit path.
select * from functional.allcomplextypes.int_array_col a inner join
functional.allcomplextypes.struct_map_col m on (a.item = m.f1)
====
---- LINEAGE
{
"hash": "6df49e42edeccad1139432ad33ad037a",
"timestamp": 1571508690,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "year",
"id": 2
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.year",
"id": 3,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "month",
"id": 4
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.month",
"id": 5,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "item",
"id": 6
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_array_col.item",
"id": 7,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "key",
"id": 8
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.key",
"id": 9,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "f1",
"id": 10
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.value.f1",
"id": 11,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "f2",
"id": 12
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.value.f2",
"id": 13,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_array_col",
"id": 14,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col",
"id": 15,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
3
],
"targets": [
2
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
4
],
"edgeType": "PROJECTION"
},
{
"sources": [
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
9
],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
11
],
"targets": [
10
],
"edgeType": "PROJECTION"
},
{
"sources": [
13
],
"targets": [
12
],
"edgeType": "PROJECTION"
},
{
"sources": [
7,
11,
14,
15
],
"targets": [
0,
2,
4,
6,
8,
10,
12
],
"edgeType": "PREDICATE"
}
],
"queryId": "e24d1c92fe46e7e4:df57585500000000",
"user": "anurag",
"queryText": "select * from functional.allcomplextypes t, t.int_array_col a, t.struct_map_col m where a.item = m.f1",
"endTime": 1571508690
}
---- QUERY
# Test relative collection table refs. Ensure that the vertex ids of sources are
# always an absolute explicit path.
select * from functional.allcomplextypes t, t.int_array_col a, t.struct_map_col m
where a.item = m.f1
====
---- LINEAGE
{
"hash": "f6e042b9788a1583e212cf90c616dfd3",
"timestamp": 1571508695,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "ab",
"id": 0
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_array_col.item",
"id": 1,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.value.f1",
"id": 2,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "c",
"id": 3
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.map_map_col.value.value",
"id": 4,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.map_map_col.value.key",
"id": 5,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "d",
"id": 6
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.int_map_col.value",
"id": 7,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "e",
"id": 8
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.complex_nested_struct_col.f2.item.f12.value.f21",
"id": 9,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.complex_nested_struct_col.f2.item.f12.key",
"id": 10,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.allcomplextypes.struct_map_col.key",
"id": 11,
"metadata": {
"tableCreateTime": 1571172144,
"tableName": "functional.allcomplextypes"
}
}
],
"edges": [
{
"sources": [
1,
2
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
4
],
"targets": [
3
],
"edgeType": "PROJECTION"
},
{
"sources": [
5
],
"targets": [
3
],
"edgeType": "PREDICATE"
},
{
"sources": [
1,
7
],
"targets": [
6
],
"edgeType": "PROJECTION"
},
{
"sources": [
9
],
"targets": [
8
],
"edgeType": "PROJECTION"
},
{
"sources": [
1,
10,
11
],
"targets": [
0,
3,
6,
8
],
"edgeType": "PREDICATE"
}
],
"queryId": "f343f3dbb3ca2a4b:7636d52400000000",
"user": "anurag",
"queryText": "select a + b as ab, c, d, e from functional.allcomplextypes t, (select sum(item) a from t.int_array_col where item < 10) v1, (select count(f1) b from t.struct_map_col group by key) v2, (select avg(value) over(partition by key) c from t.map_map_col.value) v3, (select item d from t.int_array_col union all select value from t.int_map_col) v4, (select f21 e from t.complex_nested_struct_col.f2.f12 order by key limit 10) v5",
"endTime": 1571508695
}
---- QUERY
# Test relative collection table refs in inline views.
select a + b as ab, c, d, e from functional.allcomplextypes t,
(select sum(item) a from t.int_array_col
where item < 10) v1,
(select count(f1) b from t.struct_map_col
group by key) v2,
(select avg(value) over(partition by key) c from t.map_map_col.value) v3,
(select item d from t.int_array_col
union all
select value from t.int_map_col) v4,
(select f21 e from t.complex_nested_struct_col.f2.f12 order by key limit 10) v5
====
---- LINEAGE
{
"hash": "a0b32156f73829f9d72d35d5e6091684",
"timestamp": 1571508700,
"vertices": [
{
"vertexType": "COLUMN",
"vertexId": "id",
"id": 0,
"metadata": {
"tableCreateTime": 1571508700,
"tableName": "lineage_test_db.lineage_test_view5"
}
},
{
"vertexType": "COLUMN",
"vertexId": "functional.alltypes.id",
"id": 1,
"metadata": {
"tableCreateTime": 1571175281,
"tableName": "functional.alltypes"
}
}
],
"edges": [
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PROJECTION"
},
{
"sources": [
1
],
"targets": [
0
],
"edgeType": "PREDICATE"
}
],
"queryId": "91461ace6cbd0cf4:5618eea700000000",
"user": "anurag",
"queryText": "create view lineage_test_db.lineage_test_view5 as select id from functional.alltypes_view v where not exists (select 1 from functional.alltypes a where v.id = a.id)",
"endTime": 1571508700
}
---- QUERY
# IMPALA-4206: Test creating a view whose definition has a subquery and a view reference.
create view lineage_test_db.lineage_test_view5 as
select id from functional.alltypes_view v
where not exists (select 1 from functional.alltypes a where v.id = a.id)
====