apache / iotdb

Apache IoTDB
https://iotdb.apache.org/
Apache License 2.0
5.63k stars 1.03k forks source link

Refactor UDF management process to support table model user-defined function #14135

Open Cpaulyz opened 6 days ago

Cpaulyz commented 6 days ago

Description

  1. Refactor UDF management process. Most important change is to introduce an enum type Model. UDFTable use Pair<Model, String> as hash key to support table model user-defined function now.
  2. Introduce pre create and pre drop process to avoid some corner cases due to partial create/drop. Function with UNAVAILABLE state in SHOW FUNCTIONS will perform some unexpected behaviors.

See https://timechor.feishu.cn/docx/TCyYdm8pYowe0HxEGb9c2UfenCf for more details.

codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 24.19355% with 282 lines in your changes missing coverage. Please review.

Project coverage is 39.65%. Comparing base (b8432f8) to head (656dc4c). Report is 75 commits behind head on master.

Files with missing lines Patch % Lines
...n/execution/config/metadata/ShowFunctionsTask.java 0.00% 50 Missing :warning:
...rg/apache/iotdb/confignode/manager/UDFManager.java 0.00% 42 Missing :warning:
...otdb/commons/udf/service/UDFManagementService.java 33.33% 42 Missing :warning:
...otdb/commons/udf/service/UDFExecutableManager.java 0.00% 25 Missing :warning:
...ion/config/executor/ClusterConfigTaskExecutor.java 0.00% 19 Missing :warning:
...sus/request/write/function/UpdateFunctionPlan.java 0.00% 17 Missing :warning:
...g/apache/iotdb/confignode/persistence/UDFInfo.java 0.00% 15 Missing :warning:
.../execution/config/metadata/CreateFunctionTask.java 0.00% 13 Missing :warning:
...in/java/org/apache/iotdb/commons/udf/UDFTable.java 66.66% 9 Missing :warning:
...a/org/apache/iotdb/commons/udf/UDFInformation.java 61.90% 8 Missing :warning:
... and 16 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #14135 +/- ## ============================================ - Coverage 39.95% 39.65% -0.31% Complexity 71 71 ============================================ Files 4191 4228 +37 Lines 265828 269326 +3498 Branches 32265 32642 +377 ============================================ + Hits 106217 106795 +578 - Misses 159611 162531 +2920 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

sonarcloud[bot] commented 6 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
8.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

OneSizeFitsQuorum commented 4 days ago

What a spectacular work 🦾! Fabulous design and implementation⚡️⚡️🔥