diff --git a/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/LinkisSQLConnection.scala b/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/LinkisSQLConnection.scala index e111615cee..35ec8636dd 100644 --- a/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/LinkisSQLConnection.scala +++ b/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/LinkisSQLConnection.scala @@ -18,6 +18,7 @@ package org.apache.linkis.ujes.jdbc import org.apache.linkis.common.utils.{Logging, Utils} +import org.apache.linkis.manager.label.builder.factory.LabelBuilderFactoryContext import org.apache.linkis.manager.label.constant.LabelKeyConstant import org.apache.linkis.manager.label.entity.engine.{EngineType, EngineTypeLabel, RunType} import org.apache.linkis.manager.label.utils.EngineTypeLabelCreator @@ -113,7 +114,14 @@ class LinkisSQLConnection(private[jdbc] val ujesClient: UJESClient, props: Prope if (params != null & params.length() > 0) { params.split(PARAM_SPLIT).map(_.split(KV_SPLIT)).foreach { case Array(k, v) if k.equals(UJESSQLDriver.ENGINE_TYPE) => - return EngineTypeLabelCreator.createEngineTypeLabel(v) + if (v.contains('-')) { + val factory = LabelBuilderFactoryContext.getLabelBuilderFactory + val label = factory.createLabel(classOf[EngineTypeLabel]) + label.setStringValue(v) + return label + } else { + return EngineTypeLabelCreator.createEngineTypeLabel(v) + } case _ => } } diff --git a/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineTypeLabel.java b/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineTypeLabel.java index 6e27151131..53145503e2 100644 --- a/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineTypeLabel.java +++ b/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineTypeLabel.java @@ -79,7 +79,7 @@ public Boolean isEmpty() { } @Override - protected void setStringValue(String stringValue) { + public void setStringValue(String stringValue) { if (StringUtils.isNotBlank(stringValue)) { try { HashMap valueMap =