You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ke...@apache.org on 2026/06/25 01:51:13 UTC
(tinkerpop) branch master updated (a76c72a3f6 -> 974bbdb3c1)
This is an automated email from the ASF dual-hosted git repository.
kenhuuu pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
from a76c72a3f6 Merge branch '3.8-dev'
new 7aed918320 Fix 3.7-dev to master merge issue with go test CTR
new 974bbdb3c1 Remove obsolete GType GraphBinary4 serialization CTR
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../gremlin/structure/io/binary/DataType.java | 1 -
.../io/binary/TypeSerializerRegistry.java | 1 -
.../structure/io/binary/types/EnumSerializer.java | 2 --
gremlin-go/driver/graphBinaryDeserializer.go | 4 +--
gremlin-go/driver/graphBinaryDeserializer_test.go | 20 --------------
gremlin-go/driver/graphBinarySerializer.go | 3 ---
gremlin-go/driver/graphTraversalSource_test.go | 31 ++++++++--------------
gremlin-go/driver/serializer.go | 3 ---
.../gremlin_python/structure/io/graphbinaryV4.py | 8 +-----
9 files changed, 13 insertions(+), 60 deletions(-)
(tinkerpop) 02/02: Remove obsolete GType GraphBinary4 serialization CTR
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kenhuuu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 974bbdb3c166c5aaf8f253179f78fc2bbc3554cf
Author: Ken Hu <10...@users.noreply.github.com>
AuthorDate: Wed Jun 24 17:52:25 2026 -0700
Remove obsolete GType GraphBinary4 serialization CTR
GType doesn't exist in GraphBinaryV4 so this was just a bit of
cleanup for code that was carried over from the 3.x line.
Assisted-by: Claude Code:claude-opus-4-8
---
.../gremlin/structure/io/binary/DataType.java | 1 -
.../structure/io/binary/TypeSerializerRegistry.java | 1 -
.../structure/io/binary/types/EnumSerializer.java | 2 --
gremlin-go/driver/graphBinaryDeserializer.go | 4 +---
gremlin-go/driver/graphBinaryDeserializer_test.go | 20 --------------------
gremlin-go/driver/graphBinarySerializer.go | 3 ---
gremlin-go/driver/serializer.go | 3 ---
.../gremlin_python/structure/io/graphbinaryV4.py | 8 +-------
8 files changed, 2 insertions(+), 40 deletions(-)
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/DataType.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/DataType.java
index 6ca99db840..e2af7911ac 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/DataType.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/DataType.java
@@ -53,7 +53,6 @@ public enum DataType {
BOOLEAN(0x27),
BULKSET(0X2A), // todo:
TREE(0X2B),
- GTYPE(0x30),
CHAR(0X80),
DURATION(0X81),
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/TypeSerializerRegistry.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/TypeSerializerRegistry.java
index c0a3234aac..8b35c2e43a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/TypeSerializerRegistry.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/TypeSerializerRegistry.java
@@ -20,7 +20,6 @@ package org.apache.tinkerpop.gremlin.structure.io.binary;
import org.apache.tinkerpop.gremlin.process.traversal.Merge;
import org.apache.tinkerpop.gremlin.process.traversal.Path;
-import org.apache.tinkerpop.gremlin.process.traversal.GType;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalExplanation;
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EnumSerializer.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EnumSerializer.java
index ae1d1249e4..65f21e4552 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EnumSerializer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EnumSerializer.java
@@ -26,7 +26,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.Pick;
import org.apache.tinkerpop.gremlin.process.traversal.Pop;
import org.apache.tinkerpop.gremlin.process.traversal.SackFunctions;
import org.apache.tinkerpop.gremlin.process.traversal.Scope;
-import org.apache.tinkerpop.gremlin.process.traversal.GType;
import org.apache.tinkerpop.gremlin.structure.io.binary.DataType;
import org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryReader;
import org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter;
@@ -49,7 +48,6 @@ public class EnumSerializer<E extends Enum> extends SimpleTypeSerializer<E> {
public static final EnumSerializer<Direction> DirectionSerializer = new EnumSerializer<>(DataType.DIRECTION, Direction::valueOf);
public static final EnumSerializer<T> TSerializer = new EnumSerializer<>(DataType.T, T::valueOf);
public static final EnumSerializer<Merge> MergeSerializer = new EnumSerializer<>(DataType.MERGE, Merge::valueOf);
- public static final EnumSerializer<GType> GTypeSerializer = new EnumSerializer<>(DataType.GTYPE, GType::valueOf);
private final Function<String, E> readFunc;
diff --git a/gremlin-go/driver/graphBinaryDeserializer.go b/gremlin-go/driver/graphBinaryDeserializer.go
index 6b06bc6e33..1d5b5bda09 100644
--- a/gremlin-go/driver/graphBinaryDeserializer.go
+++ b/gremlin-go/driver/graphBinaryDeserializer.go
@@ -274,7 +274,7 @@ func (d *GraphBinaryDeserializer) readValue(dt dataType, flag byte) (interface{}
return Of(b)
case byteBuffer:
return d.readByteBuffer()
- case tType, directionType, mergeType, gTypeType:
+ case tType, directionType, mergeType:
return d.readEnum(dt)
case compositePDTType:
return d.readCompositePDT()
@@ -802,8 +802,6 @@ func (d *GraphBinaryDeserializer) readEnum(dt dataType) (interface{}, error) {
return direction(s), nil
case mergeType:
return merge(s), nil
- case gTypeType:
- return gType(s), nil
default:
return s, nil
}
diff --git a/gremlin-go/driver/graphBinaryDeserializer_test.go b/gremlin-go/driver/graphBinaryDeserializer_test.go
index 044da9a877..7e777b6685 100644
--- a/gremlin-go/driver/graphBinaryDeserializer_test.go
+++ b/gremlin-go/driver/graphBinaryDeserializer_test.go
@@ -453,26 +453,6 @@ func TestGraphBinaryDeserializerComplexTypes(t *testing.T) {
assert.Equal(t, "matched", m[Merge.OnMatch], "Merge.OnMatch key should survive round-trip")
})
- t.Run("round-trip map with GType enum keys preserves types", func(t *testing.T) {
- original := map[interface{}]interface{}{
- GType.Int: "integer",
- GType.String: "string",
- }
-
- var buf bytes.Buffer
- ser := newGraphBinarySerializer(newLogHandler(&defaultLogger{}, Error, language.English))
- err := ser.ser.write(original, &buf)
- assert.Nil(t, err)
-
- d := NewGraphBinaryDeserializer(&buf)
- val, err := d.ReadFullyQualified()
- assert.Nil(t, err)
-
- m := val.(map[interface{}]interface{})
- assert.Equal(t, "integer", m[GType.Int], "GType.Int key should survive round-trip")
- assert.Equal(t, "string", m[GType.String], "GType.String key should survive round-trip")
- })
-
t.Run("reads list of integers from chunked stream", func(t *testing.T) {
// List type split across chunks
chunk1 := []byte{
diff --git a/gremlin-go/driver/graphBinarySerializer.go b/gremlin-go/driver/graphBinarySerializer.go
index c1ec27b674..5da2327d49 100644
--- a/gremlin-go/driver/graphBinarySerializer.go
+++ b/gremlin-go/driver/graphBinarySerializer.go
@@ -62,7 +62,6 @@ const (
shortType dataType = 0x26
booleanType dataType = 0x27
mergeType dataType = 0x2e
- gTypeType dataType = 0x30
durationType dataType = 0x81
compositePDTType dataType = 0xf0
markerType dataType = 0xfd
@@ -615,8 +614,6 @@ func (serializer *graphBinaryTypeSerializer) getType(val interface{}) (dataType,
return tType, nil
case merge:
return mergeType, nil
- case gType:
- return gTypeType, nil
case *BigDecimal, BigDecimal:
return bigDecimalType, nil
case *ByteBuffer, ByteBuffer:
diff --git a/gremlin-go/driver/serializer.go b/gremlin-go/driver/serializer.go
index 509d51657f..2a69942f96 100644
--- a/gremlin-go/driver/serializer.go
+++ b/gremlin-go/driver/serializer.go
@@ -203,7 +203,6 @@ func initSerializers() {
datetimeType: dateTimeWriter,
durationType: durationWriter,
directionType: enumWriter,
- gTypeType: enumWriter,
tType: enumWriter,
mergeType: enumWriter,
mapType: mapWriter,
@@ -214,5 +213,3 @@ func initSerializers() {
compositePDTType: pdtWriter,
}
}
-
-
diff --git a/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py b/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
index c6098619ce..41843a33eb 100644
--- a/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
+++ b/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py
@@ -27,7 +27,7 @@ from datetime import datetime, timedelta, timezone
from struct import pack, unpack
from aenum import Enum
-from gremlin_python.process.traversal import Direction, T, Merge, GType
+from gremlin_python.process.traversal import Direction, T, Merge
from gremlin_python.statics import FloatType, BigDecimal, ShortType, IntType, LongType, BigIntType, \
DictType, SetType, SingleByte, SingleChar
from gremlin_python.structure.graph import Graph, Edge, Property, Vertex, VertexProperty, Path, ProviderDefinedType, \
@@ -71,7 +71,6 @@ class DataType(Enum):
short = 0x26
boolean = 0x27
tree = 0x2b # not supported - no tree object in Python yet
- gtype = 0x30
char = 0x80
duration = 0x81
composite_pdt = 0xf0
@@ -851,11 +850,6 @@ class MergeIO(_EnumIO):
python_type = Merge
-class GTYPEIO(_EnumIO):
- graphbinary_type = DataType.gtype
- python_type = GType
-
-
class ByteIO(_GraphBinaryTypeIO):
python_type = SingleByte
graphbinary_type = DataType.byte
(tinkerpop) 01/02: Fix 3.7-dev to master merge issue with go test CTR
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kenhuuu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 7aed918320b302a8c4cef3169b38a75255739b60
Author: Ken Hu <10...@users.noreply.github.com>
AuthorDate: Wed Jun 24 17:45:42 2026 -0700
Fix 3.7-dev to master merge issue with go test CTR
Assisted-by: Claude Code:claude-opus-4-8
---
gremlin-go/driver/graphTraversalSource_test.go | 31 +++++++++-----------------
1 file changed, 11 insertions(+), 20 deletions(-)
diff --git a/gremlin-go/driver/graphTraversalSource_test.go b/gremlin-go/driver/graphTraversalSource_test.go
index 3891b6263a..a6bf1e602c 100644
--- a/gremlin-go/driver/graphTraversalSource_test.go
+++ b/gremlin-go/driver/graphTraversalSource_test.go
@@ -21,6 +21,7 @@ package gremlingo
import (
"github.com/stretchr/testify/assert"
+ "strings"
"testing"
)
@@ -56,37 +57,27 @@ func TestGraphTraversalSource(t *testing.T) {
})
t.Run("GraphTraversalSource.WithComputer tests", func(t *testing.T) {
- const vertexProgramStrategyName = "org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy"
-
t.Run("Test for no configuration", func(t *testing.T) {
- g := &GraphTraversalSource{graph: &Graph{}, bytecode: NewBytecode(nil), remoteConnection: nil}
+ g := &GraphTraversalSource{graph: &Graph{}, gremlinLang: NewGremlinLang(nil), remoteConnection: nil}
source := g.WithComputer()
assert.NotNil(t, source)
- assert.Equal(t, 1, len(source.bytecode.sourceInstructions))
- instruction := source.bytecode.sourceInstructions[0]
- assert.Equal(t, "withStrategies", instruction.operator)
- strategy := instruction.arguments[0].(*traversalStrategy)
- assert.Equal(t, vertexProgramStrategyName, strategy.name)
- // An empty configuration causes the server to fall back to its default GraphComputer via instance().
- assert.Equal(t, map[string]interface{}{}, strategy.configuration)
+ // An empty configuration renders without arguments, causing the server to fall back to its
+ // default GraphComputer via instance().
+ assert.True(t, strings.Contains(source.gremlinLang.GetGremlin(), "withStrategies(VertexProgramStrategy)"))
})
t.Run("Test for configured computer", func(t *testing.T) {
- g := &GraphTraversalSource{graph: &Graph{}, bytecode: NewBytecode(nil), remoteConnection: nil}
+ g := &GraphTraversalSource{graph: &Graph{}, gremlinLang: NewGremlinLang(nil), remoteConnection: nil}
source := g.WithComputer(VertexProgramStrategyConfig{
GraphComputer: "org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer",
Workers: 4,
})
assert.NotNil(t, source)
- assert.Equal(t, 1, len(source.bytecode.sourceInstructions))
- instruction := source.bytecode.sourceInstructions[0]
- assert.Equal(t, "withStrategies", instruction.operator)
- strategy := instruction.arguments[0].(*traversalStrategy)
- assert.Equal(t, vertexProgramStrategyName, strategy.name)
- assert.Equal(t, map[string]interface{}{
- "graphComputer": "org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer",
- "workers": 4,
- }, strategy.configuration)
+ gremlin := source.gremlinLang.GetGremlin()
+ // Note that config map doesn't guarantee order, so assert individually
+ assert.True(t, strings.Contains(gremlin, "withStrategies(new VertexProgramStrategy("))
+ assert.True(t, strings.Contains(gremlin, "graphComputer:\"org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer\""))
+ assert.True(t, strings.Contains(gremlin, "workers:4"))
})
})
}