[feature](Nereids) support struct type (#23597)

1. support struct data type
2. add array / map / struct literal syntax
3. fix array union / intersect / except type coercion
4. fix explict cast data type check for array
5. fix bound function type coercion
This commit is contained in:
morrySnow
2023-08-29 20:41:24 +08:00
committed by GitHub
parent 4f7e7040ad
commit e02747e976
28 changed files with 743 additions and 74 deletions

View File

@ -63,23 +63,23 @@ public class UnsupportedTypeTest extends TestWithFeService {
"select karr from type_tb",
"select array_range(10)",
"select kmap from type_tb1",
"select * from type_tb1",
"select jsonb_parse('{\"k1\":\"v31\",\"k2\":300}')",
"select * from type_tb",
"select * from type_tb1",
};
Class[] exceptions = {
null,
null,
null,
null,
AnalysisException.class,
null,
AnalysisException.class,
AnalysisException.class
};
for (int i = 0; i < 3; ++i) {
for (int i = 0; i < 5; ++i) {
runPlanner(sqls[i]);
}
for (int i = 4; i < sqls.length; ++i) {
for (int i = 5; i < sqls.length; ++i) {
int iCopy = i;
Assertions.assertThrows(exceptions[i], () -> runPlanner(sqls[iCopy]));
}