Commit Graph

8289 Commits

Author SHA1 Message Date
3c97e69f3c [fix](Nereids) should not push down project to the nullable side of outer join (#27912) 2023-12-05 10:43:33 +08:00
20d4d7eb2b [fix](Hudi-catalog) fix hudi catalog code (#27963)
In the original logic, `allfields.addall` will modify the objects in `hmsTable`.
2023-12-04 22:28:19 +08:00
8e2961858e [enhancement](Nereids): extract group plan in struct info node (#27939) 2023-12-04 19:46:40 +08:00
b096062680 [feature-wip](arrow-flight)(step6) Support regression test (#27847)
Design Documentation Linked to #25514

Regression test add a new group: arrow_flight_sql,

./run-regression-test.sh -g arrow_flight_sql to run regression-test, can use jdbc:arrow-flight-sql to run all Suites whose group contains arrow_flight_sql.
./run-regression-test.sh -g p0,arrow_flight_sql to run regression-test, can use jdbc:arrow-flight-sql to run all Suites whose group contains arrow_flight_sql, and use jdbc:mysql to run other Suites whose group contains p0 but does not contain arrow_flight_sql.
Requires attention, the formats of jdbc:arrow-flight-sql and jdbc:mysql and mysql client query results are different, for example:

Datatime field type: jdbc:mysql returns 2010-01-02T05:09:06, mysql client returns 2010-01-02 05:09:06, jdbc:arrow-flight-sql also returns 2010-01-02 05:09 :06.
Array and Map field types: jdbc:mysql returns ["ab", "efg", null], {"f1": 1, "f2": "a"}, jdbc:arrow-flight-sql returns ["ab ","efg",null], {"f1":1,"f2":"a"}, which is missing spaces.
Float field type: jdbc:mysql and mysql client returns 6.333, jdbc:arrow-flight-sql returns 6.333000183105469, in query_p0/subquery/test_subquery.groovy.
If the query result is empty, jdbc:arrow-flight-sql returns empty and jdbc:mysql returns \N.
use database; and query should be divided into two SQL executions as much as possible. otherwise the results may not be as expected. For example: USE information_schema; select cast ("0.0101031417" as datetime) The result is 2000-01-01 03:14:1 (constant fold), select cast ("0.0101031417" as datetime) The result is null (no constant fold),
In addition, doris jdbc:arrow-flight-sql still has unfinished parts, such as:

Unsupported data type: Decimal256. INVALID_ARGUMENT: [INTERNAL_ERROR]Fail to convert block data to arrow data, error: [E3] write_column_to_arrow with type Decimal256
Unsupported null value of map key. INVALID_ARGUMENT: [INTERNAL_ERROR]Fail to convert block data to arrow data, error: [E33] Can not write null value of map key to arrow.
Unsupported data type: ARRAY<MAP<TEXT,TEXT>>
jdbc:arrow-flight-sql not support connecting to specify DB name, such asjdbc:arrow-flight-sql://127.0.0.1:9090/{db_name}", In order to be compatible with regression-test, use db_nameis added before all SQLs whenjdbc:arrow-flight-sql` runs regression test.
select timediff("2010-01-01 01:00:00", "2010-01-02 01:00:00");, error java.lang.NumberFormatException: For input string: "-24:00:00"
2023-12-04 19:23:56 +08:00
86c2b93e5b [improvement](fixreplica) move to healthy replica when fix replica bad (#27934)
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-12-04 16:04:27 +08:00
e80526ee3a [opt](nereids)remove partition & histogram from col stats to reduce memory usage #27885 2023-12-04 14:52:05 +08:00
Pxl
2b715924c5 [Chore](function) set normal function use_default_implementation_for_constants to default (#27891)
set normal function use_default_implementation_for_constants to default
2023-12-04 14:19:25 +08:00
e62d19d90d [improve](partition) support auto list partition with more columns (#27817)
before the partition by column only have one column.
now remove those limit, could have more columns.
2023-12-04 11:33:18 +08:00
80f528bf26 [enhancement](backup-restore) add config for upload/download task num per be (#27772)
set upload/download task num per be, and improve the overall speed of upload/download, enhance the performance of backup and recovery.

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-12-04 11:19:45 +08:00
f8bdbf67b4 [fix](deploy) K8s deploy manager cannot get group host info by endpoint (#27813)
K8s deploy manager cannot get group host info by endpoint. If we get group host info by endpoint, there is no need to init statefulset.
2023-12-04 10:50:43 +08:00
a62ab4049e [fix](nereids)add HllUnion and BitmapUnion for pre agg match (#27548) 2023-12-04 09:48:53 +08:00
f2cfc87aca [fix](nereids) temporary partition is selected only if user manually specified (#27893)
q1: "select * from ut_p temporary partitions(tp1) where val > 0"
in q1, temporary partition tp1 is scaned

q2: "select * from ut_p where val > 0"
in q2, temporary partition tp1 is not scaned.
2023-12-04 09:44:27 +08:00
dfad778d51 [Opt](Coordinator) Don't shuffle scan range locations when performing scan range assignments. (#27268)
Currently same query will scan different bytes in each instance in a single node environment. Don't shuffle scan range locations when performing scan range assignments to avoid it.
2023-12-04 09:26:11 +08:00
ba893a4e60 [log](table) add table lock failed log (#27659) 2023-12-03 23:34:21 +08:00
16fa6a1615 [refact](bdbje) Refact BDBEnvironment and BDBJEJournal (#27778)
* Add more ut about "org.apache.doris.journal.bdbje"
* Make tiny refactor about "org.apache.doris.journal.bdbje"
2023-12-03 23:10:07 +08:00
e2d5532e3f [improvement](disk migration) disk migration skip cooldown tablets (#27807) 2023-12-03 23:05:52 +08:00
18d3f660d3 [fix](env) state listener avoid endless waiting (#27881) 2023-12-03 23:00:32 +08:00
3ddc8211d1 [FIX](array )fix array<null> literal in fe (#27750) 2023-12-03 13:19:22 +08:00
72b2a336e9 [chore](Nereids): use debug to show phase of nereids (#27903) 2023-12-02 23:19:49 +08:00
66cfcc67cb [Fix](exectuor)Fix Follower Fe query queue may not work when exec alter #27831 2023-12-02 20:19:50 +08:00
421ab56c3e [pipelineX](improvement) Support local shuffle for join and agg (#27852) 2023-12-02 20:17:18 +08:00
654984206b [feature](profile) add avg/min/max info in uint counter #27883 2023-12-02 17:32:35 +08:00
934f37ee4f [fix](Nereids): fix bugs in struct info (#27890) 2023-12-02 15:15:20 +08:00
2e1ce758f1 [feature](function) support ip function ipv6numtostring(alias inet6_ntoa) (#27342) 2023-12-02 11:48:19 +08:00
d9bbeca431 [improve](env) Improve catalog not ready tips (#27715) 2023-12-01 22:52:43 +08:00
1706699e7e [fix](multi-catalog)support the max compute partition prune (#27154)
1. max compute partition prune,
we just support filter mc partitions by '=',it can filter just one partition
to support multiple partition filter and range operator('>','<', '>='..), the partition prune should be supported.

2. add max compute row count cache and partitionValues cache

3. add max compute regression case
2023-12-01 22:28:26 +08:00
68525fc112 [feature](profile) add RuntimeFilterInfo in merge profile #27869 2023-12-01 21:42:25 +08:00
8749e5208f [fix](jdbc catalog) fix insert into jdbc table column order (#27855) 2023-12-01 20:46:48 +08:00
1451a835b7 [fix](stats) Don't save colToPartitions anymore to save mem (#27879) 2023-12-01 19:54:30 +08:00
3f20cf1456 [fix](nereids)set operation's result type is wrong if decimal overflows (#27870) 2023-12-01 18:40:06 +08:00
26e81b6573 [fix](stats)min and max return NaN when table is empty (#27862)
fix analyze empty table and min/max null value bug:
1. Skip empty analyze task for sample analyze task. (Full analyze task already skipped).
2. Check sample rows is not 0 before calculate the scale factor.
3. Remove ' in sql template after remove base64 encoding for min/max value.
2023-12-01 17:00:56 +08:00
18338a33b6 [bugfix](mergeprofile) ignore null profile to avoid bug (#27860)
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-12-01 16:56:29 +08:00
34c85c962f [opt](Nereids) improve semi/anti join estimation when column stats are unavailable #27793
this change improves performance of tpch q20. on sf500, improved from 6.3sec to 1.1 sec
this change has no impaction on tpcds

when column stats is unknown,
the basic algorithm to estimate left semi join output row count is its left child output row count.
q1: "A left semi join B on A.x=B.x"
the output row is estimated as A.rowCount.

But the basic algorithm is not good to following pattern:
q2: "A left semi join filter(B) on A.x=B.x"
Because there is a filter on B, usually this left semi join also reduce the row count of A, and we estimate
the output of q2 as A.rowCount * Filter.rowCount/B.rowCount
2023-12-01 15:48:33 +08:00
94b75515e5 [minor](stats) Throw error when sync analyze failed (#27845) 2023-12-01 15:44:27 +08:00
39692266d3 [minor](stats) Update olap table row count after analyze (#27814) 2023-12-01 13:51:42 +08:00
e868c990ff [feature](Nereids) support add constraint on table (#27627)
support add constraint on the table including
- primary key constraint
- unique constrain
- foreign key constraint
2023-12-01 13:28:48 +08:00
48d7df205f [chore](log) Add more detail msg for waitRPC exception #27771 2023-12-01 11:59:47 +08:00
776f0205f3 [Fix](test) Fix an auto partition conflict and add many testcases (#27730)
Fix an auto partition conflict and add many testcases
2023-12-01 09:58:44 +08:00
2afbece0b8 [Fix](type) fix wrong type transform for unix_timestamp (#27728)
fix wrong type transform for unix_timestamp
2023-12-01 09:58:20 +08:00
c1d73ecefb [chore](load) rm some load related redundant code (#27102) 2023-12-01 09:29:28 +08:00
6a614c3e7b [regression](nereids) add regression case for transposeSemiJoinAgg/transposeSemiJoinAggProject rules (#27664)
add case for transposeSemiJoinAgg/transposeSemiJoinAggProject rules
2023-12-01 08:19:16 +08:00
2b2c2dd772 [fix](sequence column) insert into should require sequence column in all scenario (#27780) 2023-11-30 23:27:58 +08:00
6c4ec3cb82 [FIX](complextype)fix array/map/struct impl hashcode and equals (#27717) 2023-11-30 22:08:15 +08:00
c93b5727b3 [fix](profile) fix double add in aggcounter #27826 2023-11-30 21:45:15 +08:00
16fb7a507c [fix](colocate) bucket index cannot be set correctly when do colocate balance (#27741)
for (Partition partition : olapTable.getPartitions()) {
    short replicationNum = replicaAlloc.getTotalReplicaNum();
    long visibleVersion = partition.getVisibleVersion();
    // Here we only get VISIBLE indexes. All other indexes are not queryable.
    // So it does not matter if tablets of other indexes are not matched.
    for (MaterializedIndex index : partition.getMaterializedIndices(IndexExtState.VISIBLE)) {
        Preconditions.checkState(backendBucketsSeq.size() == index.getTablets().size(),
                backendBucketsSeq.size() + " vs. " + index.getTablets().size());
        int idx = 0;
        for (Long tabletId : index.getTabletIdsInOrder()) {
            counter.totalTabletNum++;
            Set<Long> bucketsSeq = backendBucketsSeq.get(idx);
            Preconditions.checkState(bucketsSeq.size() == replicationNum,
                    bucketsSeq.size() + " vs. " + replicationNum);
            Tablet tablet = index.getTablet(tabletId);
            TabletStatus st = tablet.getColocateHealthStatus(
                    visibleVersion, replicaAlloc, bucketsSeq);
            if (st != TabletStatus.HEALTHY) {
                counter.unhealthyTabletNum++;
                unstableReason = String.format("get unhealthy tablet %d in colocate table."
                        + " status: %s", tablet.getId(), st);
                LOG.debug(unstableReason);

                if (!tablet.readyToBeRepaired(infoService, Priority.NORMAL)) {
                    counter.tabletNotReady++;
                    // 这里需要将  idx++ ,否则 bucketsSeq和 tablet replicas backends 对应不上
                    idx++;
                    continue;
                }

                TabletSchedCtx tabletCtx = new TabletSchedCtx(
                        TabletSchedCtx.Type.REPAIR,
                        db.getId(), tableId, partition.getId(), index.getId(), tablet.getId(),
                        replicaAlloc, System.currentTimeMillis());
                // the tablet status will be set again when being scheduled
                tabletCtx.setTabletStatus(st);
                tabletCtx.setPriority(Priority.NORMAL);
                tabletCtx.setTabletOrderIdx(idx);

                AddResult res = tabletScheduler.addTablet(tabletCtx, false /* not force */);
                if (res == AddResult.LIMIT_EXCEED || res == AddResult.DISABLED) {
                    // tablet in scheduler exceed limit, or scheduler is disabled,
                    // skip this group and check next one.
                    LOG.info("tablet scheduler return: {}. stop colocate table check", res.name());
                    break OUT;
                } else if (res == AddResult.ADDED) {
                    counter.addToSchedulerTabletNum++;
                }  else {
                    counter.tabletInScheduler++;
                }
            }
            idx++;
        }
    }
}
2023-11-30 20:28:18 +08:00
7f13dcc726 [refactor](cluster)(step-3) remove cluster related to Auth (#27718)
Remove `default_cluster` prefix related to:
1. User
2. Role
3. UserManager
4. RoleManager
5. UserRoleManager
6. UserProperty
7. Create/Drop user Stmt
8. Create/Drop role Stmt
9. Grant/Revoke
2023-11-30 12:46:08 +08:00
5739167142 [feature](window_function) support to secondary argument to ignore null values in first_value/last_value (#27623) 2023-11-30 09:56:43 +08:00
1f9aa8ab16 [fix](group commit) Fix some group commit problems (#27769) 2023-11-29 23:43:21 +08:00
d96e2dfefb [feature-wip](arrow-flight)(step5) Support JDBC and PreparedStatement and Fix Bug (#27661) 2023-11-29 21:17:20 +08:00
19ecb3a8a2 [opt](stats) Use escape rather than base64 for min/max value (#27746) 2023-11-29 21:13:33 +08:00