@@ -284,13 +284,16 @@ def __init__(self,
284284 rhs : QuerySelectorTestcase ,
285285 aggregation : Aggregation ,
286286 groups : List [str ],
287- columns : List [str ]):
287+ columns : List [str ],
288+ term_lhs : str , term_rhs : str ):
288289 self .__lhs : QuerySelectorTestcase = lhs
289290 self .__rhs : QuerySelectorTestcase = rhs
290291 self .__aggregation : Aggregation = aggregation
291292 self .__tc_group_by : List [str ] = groups
292293 self .__tc_attrs : List [str ] = []
293294 self .__col_variants : Dict [str , List [str ]] = {}
295+ self .__lhs_term : str = term_lhs or 'lhs'
296+ self .__rhs_term : str = term_rhs or 'rhs'
294297
295298 if self .is_compare () and 'pval' not in columns :
296299 # Always add `pval` if the query is a performance comparison
@@ -339,7 +342,7 @@ def is_compare(self):
339342 @property
340343 def lhs_column_suffix (self ):
341344 '''The suffix of the lhs column in a comparison'''
342- return ' (lhs )'
345+ return f ' ({ self . __lhs_term } )'
343346
344347 @property
345348 def lhs_select_suffix (self ):
@@ -349,7 +352,7 @@ def lhs_select_suffix(self):
349352 @property
350353 def rhs_column_suffix (self ):
351354 '''The suffix of the rhs column in a comparison'''
352- return ' (rhs )'
355+ return f ' ({ self . __rhs_term } )'
353356
354357 @property
355358 def rhs_select_suffix (self ):
@@ -405,7 +408,7 @@ def group_by(self) -> List[str]:
405408DEFAULT_GROUP_BY = ['name' , 'sysenv' , 'pvar' , 'punit' ]
406409
407410
408- def parse_cmp_spec (spec ):
411+ def parse_cmp_spec (spec , term_lhs = None , term_rhs = None ):
409412 parts = spec .split ('/' )
410413 if len (parts ) == 3 :
411414 base_spec , target_spec , aggr , cols = None , * parts
@@ -420,4 +423,5 @@ def parse_cmp_spec(spec):
420423
421424 # Update base columns for listing
422425 columns = _parse_columns (cols , group_cols + aggr .attributes ())
423- return _QueryMatch (base , target , aggr , group_cols , columns )
426+ return _QueryMatch (base , target , aggr , group_cols , columns ,
427+ term_lhs , term_rhs )
0 commit comments