@@ -2314,6 +2314,32 @@ func TestParseReturnItemsMapProjectionWithAlias(t *testing.T) {
23142314 assert .Len (t , result .Rows , 1 )
23152315}
23162316
2317+ func TestParseReturnItemsMapProjectionWithoutAlias (t * testing.T ) {
2318+ store := storage .NewMemoryEngine ()
2319+ exec := NewStorageExecutor (store )
2320+ ctx := context .Background ()
2321+
2322+ // Test that map projection syntax n { .*, key: value } WITHOUT AS alias
2323+ // Neo4j infers the column name from the variable before the map projection
2324+ params := map [string ]interface {}{
2325+ "props" : map [string ]interface {}{
2326+ "name" : "TestNode" ,
2327+ "value" : float64 (42 ),
2328+ "embedding" : []float64 {0.1 , 0.2 , 0.3 },
2329+ },
2330+ }
2331+
2332+ result , err := exec .Execute (ctx , "CREATE (n:Node $props) RETURN n { .*, embedding: null }" , params )
2333+ require .NoError (t , err )
2334+
2335+ // Should have exactly 1 column named "n" (inferred from variable)
2336+ assert .Len (t , result .Columns , 1 , "Should have exactly 1 column, not split on comma inside {}" )
2337+ assert .Equal (t , "n" , result .Columns [0 ], "Column should be named 'n' inferred from variable before {}" )
2338+
2339+ // Should have 1 row
2340+ assert .Len (t , result .Rows , 1 )
2341+ }
2342+
23172343func TestParseReturnItemsOrderByLimit (t * testing.T ) {
23182344 store := storage .NewMemoryEngine ()
23192345 exec := NewStorageExecutor (store )
0 commit comments