cp bug fix to open source branch

This commit is contained in:
obdev
2021-07-20 17:06:14 +08:00
committed by wangzelin.wzl
parent 91bb0da2ae
commit f45d2cdbe2
37 changed files with 766 additions and 628 deletions

View File

@ -27107,7 +27107,7 @@ Outputs & filters:
access([t3.c1], [t3.c3]), partitions(p[0-1]),
is_index_back=false,
range_key([t3.c1]), range(MIN ; MAX)always true
15 - output([t2.c1], [t2.c2], [t2.c3], [t1.c1 + ?]), filter(nil),
15 - output([t1.c1], [t2.c1], [t2.c2], [t2.c3], [t1.c1 + ?]), filter(nil),
conds([lnnvl(t1.c1 + ? = t2.c2)]), nl_params_(nil), batch_join=false
16 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil)
17 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), dop=1

View File

@ -3,14 +3,15 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
====================================================
|ID|OPERATOR |NAME |EST. ROWS|COST|
----------------------------------------------------
|0 |NESTED-LOOP JOIN CARTESIAN| |5100 |4078|
|0 |NESTED-LOOP JOIN CARTESIAN| |5100 |4152|
|1 | TABLE SCAN |t2 |100 |92 |
|2 | MATERIAL | |51 |324 |
|3 | MERGE SEMI JOIN | |51 |306 |
|2 | MATERIAL | |51 |345 |
|3 | MERGE JOIN | |51 |317 |
|4 | TABLE SCAN |t1 |100 |90 |
|5 | SORT | |51 |165 |
|6 | SUBPLAN SCAN |VIEW1|51 |114 |
|7 | TABLE SCAN |t2 |51 |107 |
|5 | SUBPLAN SCAN |VIEW2|51 |176 |
|6 | MERGE DISTINCT | |51 |169 |
|7 | SORT | |51 |158 |
|8 | TABLE SCAN |t2 |51 |107 |
====================================================
Outputs & filters:
@ -21,26 +22,28 @@ Outputs & filters:
access([t2.c1], [t2.c2], [t2.c3]), partitions(p0)
2 - output([t1.c1], [t1.c2]), filter(nil)
3 - output([t1.c1], [t1.c2]), filter(nil),
equal_conds([t1.c1 = VIEW1.c2]), other_conds(nil)
equal_conds([t1.c1 = VIEW2.VIEW1.c2]), other_conds(nil)
4 - output([t1.c1], [t1.c2]), filter(nil),
access([t1.c1], [t1.c2]), partitions(p0)
5 - output([VIEW1.c2]), filter(nil), sort_keys([VIEW1.c2, ASC])
6 - output([VIEW1.c2]), filter(nil),
access([VIEW1.c2])
7 - output([t2.c2]), filter([t2.c2 > ?]),
5 - output([VIEW2.VIEW1.c2]), filter(nil),
access([VIEW2.VIEW1.c2])
6 - output([t2.c2]), filter(nil),
distinct([t2.c2])
7 - output([t2.c2]), filter(nil), sort_keys([t2.c2, ASC])
8 - output([t2.c2]), filter([t2.c2 > ?]),
access([t2.c2]), partitions(p0)
Outline Data:
-------------------------------------
/*+
BEGIN_OUTLINE_DATA
LEADING(@"SEL$1" ("opt.t2"@"SEL$1" ("opt.t1"@"SEL$1" "VIEW1"@"SEL$1" )))
USE_NL(@"SEL$1" ("opt.t1"@"SEL$1" "VIEW1"@"SEL$1" ))
USE_NL_MATERIALIZATION(@"SEL$1" ("opt.t1"@"SEL$1" "VIEW1"@"SEL$1" ))
FULL(@"SEL$1" "opt.t2"@"SEL$1")
USE_MERGE(@"SEL$1" ("VIEW1"@"SEL$1" ))
FULL(@"SEL$1" "opt.t1"@"SEL$1")
FULL(@"SEL$2" "opt.t2"@"SEL$2")
LEADING(@"SEL$4" ("opt.t2"@"SEL$4" ("opt.t1"@"SEL$4" "VIEW2"@"SEL$4" )))
USE_NL(@"SEL$4" ("opt.t1"@"SEL$4" "VIEW2"@"SEL$4" ))
USE_NL_MATERIALIZATION(@"SEL$4" ("opt.t1"@"SEL$4" "VIEW2"@"SEL$4" ))
FULL(@"SEL$4" "opt.t2"@"SEL$4")
USE_MERGE(@"SEL$4" ("VIEW2"@"SEL$4" ))
FULL(@"SEL$4" "opt.t1"@"SEL$4")
FULL(@"SEL$3" "opt.t2"@"SEL$3")
END_OUTLINE_DATA
*/

View File

@ -32866,7 +32866,7 @@ SQL: select SQL_CALC_FOUND_ROWS c1 from t1 union all select c1 from t2 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -177059,7 +177059,7 @@ SQL: select t3.c2, v2.c3 from t3, (select t2.c2, v.c3 from t2, (select c3 from t
"rel_id": [
],
"value": {
"UNKNOWN":3
"UNKNOWN":4
}
}
]
@ -177171,7 +177171,7 @@ SQL: select t3.c2, v2.c3 from t3, (select t2.c2, v.c3 from t2, (select c3 from t
"rel_id": [
],
"value": {
"UNKNOWN":4
"UNKNOWN":3
}
}
]
@ -185390,7 +185390,7 @@ SQL: select t4.c2, v2.c3 from (select t2.c2, v.c3 from t2, (select c2, c3 from t
"rel_id": [
],
"value": {
"UNKNOWN":3
"UNKNOWN":4
}
}
]
@ -185502,7 +185502,7 @@ SQL: select t4.c2, v2.c3 from (select t2.c2, v.c3 from t2, (select c2, c3 from t
"rel_id": [
],
"value": {
"UNKNOWN":4
"UNKNOWN":3
}
}
]

View File

@ -9972,7 +9972,7 @@ SQL: select * from v limit 10 union select * from v limit 10 union select * from
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -10577,7 +10577,7 @@ SQL: select * from v limit 10 union select * from v limit 10 union select * from
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -11182,7 +11182,7 @@ SQL: select * from v limit 10 union select * from v limit 10 union select * from
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -11803,7 +11803,7 @@ SQL: select * from v limit 10 union select * from v limit 10 union select * from
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -11870,7 +11870,7 @@ SQL: select * from v limit 10 union select * from v limit 10 union select * from
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -13766,7 +13766,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -13833,7 +13833,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -14454,7 +14454,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -14521,7 +14521,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -15142,7 +15142,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -15209,7 +15209,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -15830,7 +15830,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -15897,7 +15897,7 @@ SQL: select * from v order by c1 union select * from v order by c1 union select
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -17793,7 +17793,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -17860,7 +17860,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -18481,7 +18481,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -18548,7 +18548,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -19169,7 +19169,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -19236,7 +19236,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -19857,7 +19857,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
@ -19924,7 +19924,7 @@ SQL: select * from v order by c1 union all select * from v order by c1 union all
"precision":11,
"scale":0
},
"flag":16387,
"flag":16386,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",

View File

@ -33,9 +33,9 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
"view_base_item":-1
},
{
"table_id":-3,
"table_name":"VIEW1",
"alias_name":"VIEW1",
"table_id":-5,
"table_name":"VIEW2",
"alias_name":"VIEW2",
"synonym_name":"",
"synonym_db_name":"",
"table_type":2,
@ -50,140 +50,6 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
"joined_table": [
],
"semi_info": [
{
"join_type":5,
"semi_id":-4,
"left_table_ids": [
1099511677779
],
"right_table_id":-3,
"semi_conditions": [
{
"item_type":"T_OP_EQ",
"result_type": {
"meta": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
},
"accuracy": {
"length":-1,
"precision":1,
"scale":0
},
"flag":0,
"calc_type": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
}
},
"expr_info": [
"CNT_COLUMN",
"IS_JOIN_COND"
],
"rel_id": [
1,
3
],
"expr_levels": [
0
],
"children": [
{
"item_type":"T_REF_COLUMN",
"result_type": {
"meta": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
},
"accuracy": {
"length":-1,
"precision":11,
"scale":0
},
"flag":16387,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
"coercibility":"INVALID"
}
},
"expr_info": [
"IS_COLUMN",
"CNT_COLUMN"
],
"rel_id": [
1
],
"table_id":1099511677779,
"column_id":16,
"database_name":"opt",
"table_name":"t1",
"synonym_name":"",
"synonym_db_name":"",
"column_name":"c1",
"expr_level":0,
"expr_levels": [
0
],
"column_flags":0,
"enum_set_values": [
],
"is_lob_column":false,
"is_unpivot_mocked_column":false,
"is_hidden":false
},
{
"item_type":"T_REF_COLUMN",
"result_type": {
"meta": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
},
"accuracy": {
"length":-1,
"precision":11,
"scale":0
},
"flag":0,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
"coercibility":"INVALID"
}
},
"expr_info": [
"IS_COLUMN",
"CNT_COLUMN"
],
"rel_id": [
3
],
"table_id":-3,
"column_id":16,
"database_name":"",
"table_name":"VIEW1",
"synonym_name":"",
"synonym_db_name":"",
"column_name":"c2",
"expr_level":0,
"expr_levels": [
0
],
"column_flags":0,
"enum_set_values": [
],
"is_lob_column":false,
"is_unpivot_mocked_column":false,
"is_hidden":false
}
]
}
]
}
],
"partition_express": [
],
@ -470,8 +336,8 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
},
{
"column_id":16,
"table_id":-3,
"column":"c2",
"table_id":-5,
"column":"VIEW1.c2",
"auto_filled_timestamp":false,
"default_value": {
"NULL":"NULL"
@ -505,13 +371,13 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
"rel_id": [
3
],
"table_id":-3,
"table_id":-5,
"column_id":16,
"database_name":"",
"table_name":"VIEW1",
"table_name":"VIEW2",
"synonym_name":"",
"synonym_db_name":"",
"column_name":"c2",
"column_name":"VIEW1.c2",
"expr_level":0,
"expr_levels": [
0
@ -853,6 +719,10 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
{
"table_id":1099511677780,
"is_join":false
},
{
"table_id":-5,
"is_join":false
}
],
"start_with": [
@ -971,6 +841,130 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
}
}
]
},
{
"item_type":"T_OP_EQ",
"result_type": {
"meta": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
},
"accuracy": {
"length":-1,
"precision":1,
"scale":0
},
"flag":0,
"calc_type": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
}
},
"expr_info": [
"CNT_COLUMN",
"IS_JOIN_COND"
],
"rel_id": [
1,
3
],
"expr_levels": [
0
],
"children": [
{
"item_type":"T_REF_COLUMN",
"result_type": {
"meta": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
},
"accuracy": {
"length":-1,
"precision":11,
"scale":0
},
"flag":16387,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
"coercibility":"INVALID"
}
},
"expr_info": [
"IS_COLUMN",
"CNT_COLUMN"
],
"rel_id": [
1
],
"table_id":1099511677779,
"column_id":16,
"database_name":"opt",
"table_name":"t1",
"synonym_name":"",
"synonym_db_name":"",
"column_name":"c1",
"expr_level":0,
"expr_levels": [
0
],
"column_flags":0,
"enum_set_values": [
],
"is_lob_column":false,
"is_unpivot_mocked_column":false,
"is_hidden":false
},
{
"item_type":"T_REF_COLUMN",
"result_type": {
"meta": {
"type":"INT",
"collation":"binary",
"coercibility":"NUMERIC"
},
"accuracy": {
"length":-1,
"precision":11,
"scale":0
},
"flag":0,
"calc_type": {
"type":"NULL",
"collation":"invalid_type",
"coercibility":"INVALID"
}
},
"expr_info": [
"IS_COLUMN",
"CNT_COLUMN"
],
"rel_id": [
3
],
"table_id":-5,
"column_id":16,
"database_name":"",
"table_name":"VIEW2",
"synonym_name":"",
"synonym_db_name":"",
"column_name":"VIEW1.c2",
"expr_level":0,
"expr_levels": [
0
],
"column_flags":0,
"enum_set_values": [
],
"is_lob_column":false,
"is_unpivot_mocked_column":false,
"is_hidden":false
}
]
}
],
"group_by": [
@ -1182,8 +1176,8 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
"is_hidden":false
},
"is_alias":false,
"alias_name":"c2",
"expr_name":"c2",
"alias_name":"VIEW1.c2",
"expr_name":"",
"default": {
"NULL":"NULL"
},
@ -1199,7 +1193,7 @@ SQL: select * from t1, t2 where t1.c1 > 10 and t1.c1 in (select c2 from t2);
"is_hidden_rowid":false
}
],
"distinct":false,
"distinct":true,
"rollup":false,
"nocycle":false,
"from": [