File tree 1 file changed +20
-0
lines changed 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -566,3 +566,23 @@ def test_snapshot_compatibility(self):
566
566
self ._process_on_stop ()
567
567
prev_version = version
568
568
num_snapshot += 1
569
+
570
+ class ObjectDepthLimitCompatibilityTest (NodeProvider , unittest .TestCase ):
571
+ def test_object_depth (self ):
572
+ cluster = self ._new_cluster ('5.10.x' , 1 )
573
+ cluster .start ()
574
+
575
+ depth = 101
576
+
577
+ node = cluster .node ()
578
+ with connect (node .http_url , error_trace = True ) as conn :
579
+ c = conn .cursor ()
580
+ c .execute ("create table tbl (" + ("o object as (" * depth ) + "x int" + (")" * depth ) + ")" )
581
+
582
+ node = self .upgrade_node (node , 'latest-nightly' )
583
+ with connect (node .http_url , error_trace = True ) as conn :
584
+ c = conn .cursor ()
585
+ c .execute ("alter table tbl add column o" + "['o']" * (depth - 1 ) + "['y'] int" )
586
+ c .execute ("insert into tbl values (" + "{o=" * (depth - 1 ) + "{x=1, y=2}" + "}" * (depth - 1 ) + ")" )
587
+ c .execute ("select o" + "['o']" * (depth - 1 ) + "from tbl" )
588
+ self .assertEqual (c .fetchall (), [["{x=1, y=1}" ]])
You can’t perform that action at this time.
0 commit comments