From 1f2c2091dd158b3c156108de5f7e33e364307061 Mon Sep 17 00:00:00 2001 From: JJUN99 <146200038+JJUN99@users.noreply.github.com> Date: Tue, 11 Aug 2026 12:27:10 +0900 Subject: [PATCH 1/2] fix(cloudext): do not JSON-encode scalar String property values Neo4jSinkWriter JSON-encodes any property value for which TypeChecker.isArrayOrCollectionOfPrimitives() returns false. Since the check returned false for scalar strings (and String was missing from isPrimitiveOrWrapper), every string property was stored double-encoded with surrounding quotes (e.g. 102191 -> "102191"). The reasoner reads raw property values, so numeric functions in concept rules (sum, date_diff, ...) silently fail to match on such values and rule-derived properties all resolve to null. Reading the value directly raises NumberFormatException: For input string: '"102191"'. Treat scalar strings as storable as-is, and accept String elements inside arrays/collections for the same reason. Co-Authored-By: Claude Fable 5 --- .../cloudext/interfaces/graphstore/util/TypeChecker.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cloudext/interface/graph-store/src/main/java/com/antgroup/openspg/cloudext/interfaces/graphstore/util/TypeChecker.java b/cloudext/interface/graph-store/src/main/java/com/antgroup/openspg/cloudext/interfaces/graphstore/util/TypeChecker.java index 0bde51d81..080d20e8e 100644 --- a/cloudext/interface/graph-store/src/main/java/com/antgroup/openspg/cloudext/interfaces/graphstore/util/TypeChecker.java +++ b/cloudext/interface/graph-store/src/main/java/com/antgroup/openspg/cloudext/interfaces/graphstore/util/TypeChecker.java @@ -42,13 +42,19 @@ public static boolean isPrimitiveOrWrapper(Object obj) { || clazz.equals(Short.class) || clazz.equals(Byte.class) || clazz.equals(Boolean.class) - || clazz.equals(Character.class); + || clazz.equals(Character.class) + || clazz.equals(String.class); } public static boolean isArrayOrCollectionOfPrimitives(Object obj) { if (obj == null) { return false; } + if (obj instanceof String) { + // scalar strings must be stored as-is: JSON-encoding them adds surrounding + // quotes (e.g. 102191 -> "102191"), which breaks numeric coercion at read time + return true; + } if (obj instanceof Object[]) { for (Object element : (Object[]) obj) { if (!isPrimitiveOrWrapper(element)) { From c9459a22286b52c953e8966142158f66bf52a208 Mon Sep 17 00:00:00 2001 From: JJUN99 <146200038+JJUN99@users.noreply.github.com> Date: Tue, 11 Aug 2026 12:49:44 +0900 Subject: [PATCH 2/2] chore: retrigger CI (license check hit a transient dependency download error)