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