This is an automated email from the ASF dual-hosted git repository.

justinchen pushed a commit to branch new_opc_server
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/new_opc_server by this push:
     new 5b8eb185fc9 fix
5b8eb185fc9 is described below

commit 5b8eb185fc9a4e51cbfeed9173463dd532599632
Author: Caideyipi <[email protected]>
AuthorDate: Thu Dec 4 16:07:26 2025 +0800

    fix
---
 .../src/main/java/org/apache/iotdb/opcua/ClientTest.java         | 2 +-
 .../apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/example/pipe-opc-ua-sink/src/main/java/org/apache/iotdb/opcua/ClientTest.java 
b/example/pipe-opc-ua-sink/src/main/java/org/apache/iotdb/opcua/ClientTest.java
index a1aa1ef2521..d38a07c61cd 100644
--- 
a/example/pipe-opc-ua-sink/src/main/java/org/apache/iotdb/opcua/ClientTest.java
+++ 
b/example/pipe-opc-ua-sink/src/main/java/org/apache/iotdb/opcua/ClientTest.java
@@ -89,7 +89,7 @@ public class ClientTest implements ClientExample {
                         NodeClass.Object,
                         ExtensionObject.encode(
                             client.getStaticSerializationContext(), 
createFolderAttributes()),
-                        Identifiers.ObjectsFolder.expanded()),
+                        Identifiers.FolderType.expanded()),
                     new AddNodesItem(
                         new NodeId(2, "root/sg/d1").expanded(),
                         Identifiers.Organizes,
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
index a4d5515e3e0..698c15dd429 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
@@ -561,6 +561,15 @@ public class OpcUaNameSpace extends 
ManagedNamespaceWithLifecycle {
           final ObjectAttributes objectAttributes =
               (ObjectAttributes)
                   
item.getNodeAttributes().decode(getServer().getSerializationContext());
+          if (typeDefinition.get().equals(Identifiers.FolderType)) {
+            newNode =
+                new UaFolderNode(
+                    getNodeContext(),
+                    nodeId.get(),
+                    item.getBrowseName(),
+                    objectAttributes.getDisplayName());
+            break;
+          }
           newNode =
               new UaObjectNode.UaObjectNodeBuilder(getNodeContext())
                   .setNodeId(nodeId.get())

Reply via email to