Commit Graph

5755 Commits

Author SHA1 Message Date
e78afedd0a [minor](refactor) refine function logics (#22280) 2023-07-27 15:09:23 +08:00
ddfdf62993 [opt](planner) support to parse scientific notation(aEb) (#22248) 2023-07-27 13:31:37 +08:00
a630f127ce [fix](planner) fix bug of push down conjuncts through agg (#22202)
should use both contains and comeFrom method to check if the conjunct can be pushed down throgh agg node
2023-07-27 13:20:50 +08:00
8b51bfa384 [fix](planner) fix bug of unexpected nest loop join (#22236)
use isLiteral instead of isConstant to check if the expr is a literal. This prevent the unexpected nest loop join, see the test case for detail
2023-07-27 13:20:29 +08:00
41a230b721 [fix] iceberg catalog to specify the version and time (#22209)
problem:
1. create a iceberg_type catalog:
2. use iceberg catalog to specify verison
```
mysql> show catalog iceberg;
+----------------------+--------------------------+
| Key                  | Value                    |
+----------------------+--------------------------+
| type                 | iceberg                  |
| iceberg.catalog.type | hms                      |
| hive.metastore.uris  | thrift://127.0.0.1:9083 |
| hadoop.username      | hadoop                   |
| create_time          | 2023-07-25 16:51:00.522  |
+----------------------+--------------------------+
5 rows in set (0.02 sec)

mysql> select * from iceberg.iceberg_db.tb1 FOR VERSION AS OF 8783036402036752909;
ERROR 5090 (42000): errCode = 2, detailMessage = Only iceberg/hudi external table supports time travel in current version
```

change:
Add `ICEBERG_EXTERNAL_TABLE` type for specify the version and time
2023-07-27 12:04:41 +08:00
31c856351a [enhancement](default_config) change default value of rpc related (#22149)
configs

Bdbje elect timeout is 30 seconds, so we enlarge thrift_rpc_timeout_ms
and txn_commit_rpc_timeout_ms to 60s.

BTW: enlarge bdbje_lock_timeout_second from 1 to 5.
2023-07-27 11:12:26 +08:00
619a2857e1 [improvement](jdbc catalog) improve mysql jdbc catalog read bytea`s types & else improve (#22233) 2023-07-27 10:18:37 +08:00
052a416d49 [Enhencement](binlog) db enable binlog (#22256)
* Improve db update binlog properties (binlog.enable = "true") with check
all table enable binlog

* Add more test_alter_database_property regression test
2023-07-27 10:03:51 +08:00
341c45974c [round](decimalv2) round precise decimalv2 value (#22258) 2023-07-27 10:00:36 +08:00
163a38a527 [opt](Nereids) support sql cache (#22144)
1. let Nereids support sql cache
2. let legacy planner's sql cache supports union all
2023-07-27 09:57:31 +08:00
82fe78ce84 Update table binlog config disable failure when db binlog is enable && (#22253)
modify table binlog more than one property

Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-07-27 09:54:24 +08:00
fb41265c27 [opt](Nereids) add boolean type signature for sum aggregate function (#21959) 2023-07-27 09:41:19 +08:00
331ae6d2cb [fix](Unique-Key) fix version upgrade caused MOR to become MOW (#22243) 2023-07-26 19:38:24 +08:00
490ad14720 [stats](nereids)in predicate range adjust (#22156)
1. refactor in-predicate filter estimation
example: A in (1, 2, 3, 4)
after in-preidcate filter, A.stats.max<=4 and A.stats.min>=1
2. maintain minExpr and maxExpr in in-predicate stats derive
2023-07-26 19:10:04 +08:00
fdb26a524a [fix](compile) Fix FE compile error (#22261)
Fix FE compile error
2023-07-26 18:39:21 +08:00
4e57f45d8e [fix](partial-update) sequence column not updated if using function_column.sequence_type (#22250) 2023-07-26 18:22:43 +08:00
9a07ae890a [fix](point query) Fix ArrayIndexOutOfBoundsException if close a prepare stmt (#22237) 2023-07-26 18:22:07 +08:00
14dcc53135 [fix](Nereids) cast time should turn nullable on all valid types (#22242)
valid types to cast to time/timev2:
- TINYINT
- SMALLINT
- INT
- BIGINT
- LARGEINT
- FLOAT
- DOUBLE
- CHAR
- VARCHAR
- STRING
2023-07-26 17:56:19 +08:00
be69025878 [opt](Nereids) add partial update support for delete stmt (#22184)
Currently, the new optimizer don't consider anything about partial update.
This PR add the ability to convert a delete statement to a partial update insert statement
for merge-on-write unique table
2023-07-26 17:34:31 +08:00
0b05c0b841 [chore](tools) add icon.svg to .idea to let idea present doris's logo (#22234) 2023-07-26 17:27:47 +08:00
582acad8a1 [feature](stats) Enable period time with cron expr (#22095)
Support such grammar

ANALYZE TABLE test WITH CRON "* * * * * ?"

Such job would be scheduled as the cron expr specifie, but natively support minute-level schedule only
2023-07-26 17:25:57 +08:00
964ac4e601 [opt](nereids) Retry when async analyze task failed (#21889)
Retry at most 5 times when async analyze task execution failed
2023-07-26 17:16:56 +08:00
af20d0c521 [fix](binlog) Fix BinlogUtils getExpiredMs overflow (#22174) 2023-07-26 15:15:34 +08:00
9f3960b460 [fix](kerberos)fix kerberos config read (#22081)
we should read kerberos config from properties first, so use override hive conf to set.
2023-07-26 13:36:12 +08:00
bb67a1467a [fix](Nereids): mergeGroup should merge target Group into existed Group (#22123) 2023-07-26 13:13:25 +08:00
21a3593a9a [fix](Nereids) translate failed when enable topn two phase opt (#22197)
1. should not add rowid slot to reslovedTupleExprs
2. should set notMaterialize to sort's tuple when do two phase opt
2023-07-26 11:38:50 +08:00
4c4f08f805 [fix](hudi) the required fields are empty if only reading partition columns (#22187)
1. If only read the partition columns, the `JniConnector` will produce empty required fields, so `HudiJniScanner` should read the "_hoodie_record_key" field at least to know how many rows in current hoodie split. Even if the `JniConnector` doesn't read this field, the call of `releaseTable` in `JniConnector` will reclaim the resource.

2. To prevent BE failure and exit, `JniConnector` should call release methods after `HudiJniScanner` is initialized. It should be noted that `VectorTable` is created lazily in `JniScanner`,  so we don't need to reclaim the resource when `HudiJniScanner` is failed to initialize.

## Remaining works
Other jni readers like `paimon` and `maxcompute` may encounter the same problems, the jni reader need to handle this abnormal situation on its own, and currently this fix can only ensure that BE will not exit.
2023-07-26 10:59:45 +08:00
9abf32324b [improvement](jdbc) add timestamp put to datev2 (#21680) 2023-07-26 09:10:34 +08:00
5f846056f7 [fix](forward) fix MissingFormatArgumentException when failed to forward stmt to Master (#22142) 2023-07-26 09:00:04 +08:00
cf717882d8 [fix](jdbc catalog) fix hana jdbc table bug (#22190) 2023-07-26 08:45:06 +08:00
ba3a0922eb [fix](ipv6)Support IPV6 (#22219)
fe:Remove restrictions from IPv4
be: thrift server Specify binding address
be: Restore changed code of “be/src/olap/task/engine_clone_task.cpp”
2023-07-26 08:40:32 +08:00
e8f4323e0f [Fix](jdbcCatalog) fix typo of some variable #22214 2023-07-26 08:34:45 +08:00
3414d1a61f [fix](hudi) table schema is not the same as parquet schema (#22186)
Upgrade hudi version from 0.13.0 to 0.13.1, and keep the hudi version of jni scanner the same as that of FE.
This may fix the bug of the table schema is not same as parquet schema.
2023-07-26 00:29:53 +08:00
cf677b327b [fix](jdbc catalog) Fixed mappings with type errors for bool and tinyint(1) (#22089)
First of all, mysql does not have a boolean type, its boolean type is actually tinyint(1), in the previous logic, We force tinyint(1) to be a boolean by passing tinyInt1isBit=true, which causes an error if tinyint(1) is not a 0 or 1, Therefore, we need to match tinyint(1) according to tinyint instead of boolean, and this change will not affect the correctness of where k = 1 or where k = true queries
2023-07-25 22:45:22 +08:00
b2be42c31c [fix](jdbc catalog) fix jdbc catalog like expr query error (#22141) 2023-07-25 22:30:28 +08:00
f44660db1a [chore](merge-on-write) disable single replica load and compaction for mow table (#22188) 2023-07-25 22:05:22 +08:00
999fbdc802 [improvement](jdbc) add new type 'object' of int (#21681) 2023-07-25 21:29:46 +08:00
20f180c4e1 [fix](iceberg) fix error when query iceberg v2 format (#22182)
This bug is introduced from #21771
Missing fileType field of TFileScanRangeParams, so the delete file of iceberg v2 will be treated as local file
and fail to read.
2023-07-25 21:15:46 +08:00
6dd0ca6d0b [fix](nereids) fix runtime filter on cte sender and set operation (#22181)
Current rf pushdown framework doesn't handle cte sender right. On cte consumer, it just return false and this will cause the rf is generated at the wrong place and lead the expr_order checking failed, but actually it should be pushed down on the cte sender. Also, set operation pushing down is unreachable if the outer stmt uses the alias of set operation's output before probeSlot's translation. Both of the above issues will be fixed in this pr
2023-07-25 20:26:04 +08:00
1715a824dd [fix](nereids) fix partition dest overwrite bug when cte as bc right (#22177)
In current cte multicast fragment param computing logic in coordinator, if shared hash table for bc opened, its destination's number will be the same as be hosts'. But the judgment of falling into shared hash table bc part code is wrong, which will cause when a multicast's target is fixed with both bc and partition, the first bc info will overwrite the following partition's, i.e, the destination info will be the host level, which should be per instance. This will cause the hash partition part hang.
2023-07-25 19:26:29 +08:00
28bbfdd590 [Fix](Nereids) fix minidump unit test caused of columnstatus changed (#22201)
Problem:
Minidump unit test failed because of column statistic deserialization need a new column schema but not added to minidump unit test file

Solved:
Add last update time to unit test input file
2023-07-25 19:23:12 +08:00
30965eed21 [fix](stats) Ignore complex type by default when collect column statistics (#21965)
By default, if it contains any complex type in Analyze stmt submitted by user and error would be thrown before this PR.
2023-07-25 18:26:49 +08:00
3b6702a1e3 [Bug](point query) cancel future when meet timeout in PointQueryExec (#21573)
1. cancel future when meet timeout and add config to modify rpc timeout
2. add config to modify numof BackendServiceProxy since under high concurrent work load GRPC channel will be blocked
2023-07-25 18:18:09 +08:00
f74f3e7944 [refactor](Nereids) add sink interface and abstract class (#22150)
1. add trait Sink
2. add abstract class LogicalSink and PhysicalSink
3. replace some sink visitor by visitLogicalSink and visitPhysicalSink
2023-07-25 17:51:49 +08:00
39ca91fc22 [opt](Nereids) always fallback when parse failed (#21865)
always fallback to legacy planner when parse failed even if enable_fallback_to_original_planner is set to false
2023-07-25 17:08:57 +08:00
f84af95ac4 [feature](Nereids) Add minidump replay and refactor user feature of minidump (#20716)
### Two main changes:
- 1、add minidump replay
- 2、change minidump serialization of statistic messages and some interface between main logic of nereids optimizer and minidump

### Use of nereids ut:
- 1、save minidump files:  
        Execute command by mysql-client:
```
set enable_nereids_planner=true;
set enable_minidump=true;
```
        Execute sql in mysql-client
- 2、use nereids-ut script to execute directory:
```
cp -r ${DORIS_HOME}/minidump ${DORIS_HOME}/output/fe && cd ${DORIS_HOME}/output/fe
./nereids_ut --d ${directory_of_minidump_files}
```

### Refactor of minidump
- move statistics used serialization to serialization of input and serialize with catalogs
- generating minidump file only when enable_minidump flag is set, minidump module interactive with main optimizer only by :
serializeInputsToDumpFile(catalog, statistics, query) && serializeOutputsToDumpFile(outputplan).
2023-07-25 15:26:19 +08:00
fc2b9db0ad [Feature](inverted index) add tokenize function for inverted index (#21813)
In this PR, we introduce TOKENIZE function for inverted index, it is used as following:
```
SELECT TOKENIZE('I love my country', 'english');
```
It has two arguments, first is text which has to be tokenized, the second is parser type which can be **english**, **chinese** or **unicode**.
It also can be used with existing table, like this:
```
mysql> SELECT TOKENIZE(c,"chinese") FROM chinese_analyzer_test;
+---------------------------------------+
| tokenize(`c`, 'chinese')              |
+---------------------------------------+
| ["来到", "北京", "清华大学"]          |
| ["我爱你", "中国"]                    |
| ["人民", "得到", "更", "实惠"]        |
+---------------------------------------+
```
2023-07-25 15:05:35 +08:00
d96e31c4d7 [opt](Nereids) not push down global limit to avoid early gather (#21891)
the global limit will create a gather action, and all the data will be calculated in one instance. If we push down the global limit, the node run after the limit node will run slowly.
We fix it by push down only local limit.

a join plan tree before fixing:

```
LogicalLimit(global)
    LogicalLimit(local)
        Plan()
            LogicalLimit(global)
                LogicalLimit(local)
                    LogicalJoin
                        LogicalLimit(global)
                            LogicalLimit(local)
                                Plan()
                        LogicalLimit(global)
                            LogicalLimit(local)
                                Plan()    

after fixing:
LogicalLimit(global)
    LogicalLimit(local)      
        Plan()
            LogicalLimit(local)
                LogicalJoin
                    LogicalLimit(local)
                        Plan()
                    LogicalLimit(local)
                        Plan()
```
2023-07-25 14:45:20 +08:00
28b714c371 [feature](executor) using fe version to set instance_num (#22047) 2023-07-25 14:37:42 +08:00
0f439bb1ca [vectorized](udf) java udf support map type (#22059) 2023-07-25 11:56:20 +08:00