Add filter operator to join children according to the predicate of filter and join, in order to achieving predicate push-down
Pattern:
```
filter
|
join
/ \
child child
```
Transform:
```
filter
|
join
/ \
filter filter
| |
child child
```
Since we will do the column prune with project node, so we need compact the project outputs to the PlanNode in PhysicalPlanTranslator::visitPhysicalProject
1. Add support for ProjectNode to make column prune available.
2. Add SortNode to PlanFragment when it is unpartitioned piggyback
1. Added flag exec_env_existed to indicate whether ExecEnv Instance is created.
2. ThreadMemTrackerMgr::add_tracker fail when USE_MEM_TRACKER=OFF, add USE_MEM_TRACKER compile option.
Organize the plan process, improve the batch execution of rules and the way to add jobs.
Fix the problem that the condition in PhysicalHashJoin is empty.
Follow-up #10241, this PR go through parse and analyze the SSB and add this functions:
1. support parse parenthesizedExpression
2. support analyze LogicalAggregate and LogicalSort
3. replace the functionCall to UnboundFunction and BoundFunction
4. support sum aggregate funciton
5. fix the dead loop in the ExpressionRewriter
6. refine some code
This pr follows up [#10435](https://github.com/apache/doris/pull/10435). [#10435](https://github.com/apache/doris/pull/10435) had supported catalog in sql syntax, but some doris statements are only valid in internal catalog. In order to remind users of the scope of catalog usage, it is necessary to throw errors to exceptions of using catalog in the analyze phase.
## How does it effect origin behavior
It is fully compatible with the previous sql statements. Meanwhile, if using the internal catalog in the statements that all the usage of the internal catalog, the syntax is still valid, but using the external catalog will directly throw errors. For example:
```
MySQL [(none)]> show data from tpch10.lineitem;
+-----------+-----------+------------+--------------+----------+
| TableName | IndexName | Size | ReplicaCount | RowCount |
+-----------+-----------+------------+--------------+----------+
| lineitem | lineitem | 210.809 MB | 32 | 6001215 |
| | Total | 210.809 MB | 32 | |
+-----------+-----------+------------+--------------+----------+
MySQL [(none)]> show data from internal_catalog.tpch10.lineitem;
+-----------+-----------+------------+--------------+----------+
| TableName | IndexName | Size | ReplicaCount | RowCount |
+-----------+-----------+------------+--------------+----------+
| lineitem | lineitem | 210.809 MB | 32 | 6001215 |
| | Total | 210.809 MB | 32 | |
+-----------+-----------+------------+--------------+----------+
MySQL [(none)]> show data from hive.tpch10.lineitem;
ERROR 1105 (HY000): errCode = 2, detailMessage = External catalog 'hive' is not allowed in 'ShowDataStmt'
```
Define a new file scanner node for hms table in be.
This file scanner node is different from broker scan node as blow:
1. Broker scan node will define src slot and dest slot, there is two memory copy in it: first is from file to src slot
and second from src to dest slot. Otherwise FileScanNode only have one stemp memory copy just from file to dest slot.
2. Broker scan node will read all the filed in the file to src slot and FileScanNode only read the need filed.
3. Broker scan node will convert type into string type for src slot and then use cast to convert to dest slot type,
but FileScanNode will have the final type.
Now FileScanNode is a standalone code, but we will uniform the file scan and broker scan in the feature.
In order to complete the ssb test, temporarily increase the implementation of costAndEnforcerJob, and create an OptimizeGroupjob for all children of the group.
Add more implmentation rules.
Current some `logical` and `physical` operator is different. I change some code to make them match.
Implementation
- Sort:only heap sort
- Agg
- OlapScan