#NEWLINE# @ SkipTest #NEWLINE# def test_dim_size( self ) : #NEWLINE# #INDENT# def get_dim_size( expr ) : #NEWLINE# #INDENT# producer = expr . children ( ) [ 0 ] . input . input #NEWLINE# return producer . hyper_cube_dimensions #NEWLINE# #UNINDENT# def get_work_load( expr , dim_sizes ) : #NEWLINE# #INDENT# children = expr . children ( ) #NEWLINE# children = [ c . input for c in children ] #NEWLINE# child_schemes = [ c . scheme ( ) for c in children ] #NEWLINE# conditions = myrialang . convert_nary_conditions ( expr . conditions , child_schemes ) #NEWLINE# HSClass = myrialang . HCShuffleBeforeNaryJoin #NEWLINE# r_index = HSClass . reversed_index ( child_schemes , conditions ) #NEWLINE# child_sizes = [ len ( cs ) for cs in child_schemes ] #NEWLINE# return HSClass . workload ( dim_sizes , child_sizes , r_index ) #NEWLINE# #UNINDENT# triangular_join = testNaryJoin . get_phys_plan_root ( 'A(x,y,z):-R(x,y),S(y,z),T(z,x)' , 64 ) #NEWLINE# self . assertEqual ( get_dim_size ( triangular_join ) , ( 4 , 4 , 4 ) ) #NEWLINE# rect_join = testNaryJoin . get_phys_plan_root ( 'A(x,y,z):-R(x,y),S(y,z),T(z,p), N(p,x)' , 256 ) #NEWLINE# self . assertEqual ( get_work_load ( rect_join , [ 4 , 4 , 4 , 4 ] ) , get_work_load ( rect_join , get_dim_size ( rect_join ) ) )