def get_meter_columns(metaquery=None, need_timestamp=False, **kwargs):
 columns = ['f:message', 'f:recorded_at']
 columns.extend((('f:%s' % k) for (k, v) in kwargs.items() if (v is not None)))
 if metaquery:
  columns.extend((('f:r_%s' % k) for (k, v) in metaquery.items() if (v is not None)))
 source = kwargs.get('source')
 if source:
  columns.append(('f:s_%s' % source))
 if need_timestamp:
  columns.extend(['f:rts', 'f:timestamp'])
 return columns

def get_meter_columns ( metaquery = None , need_timestamp = False , ** kwargs ) : columns = [ 'f:message' , 'f:recorded_at' ] columns . extend ( ( ( 'f:%s' % k ) for ( k , v ) in kwargs . items ( ) if ( v is not None ) ) ) if metaquery : columns . extend ( ( ( 'f:r_%s' % k ) for ( k , v ) in metaquery . items ( ) if ( v is not None ) ) ) source = kwargs . get ( 'source' ) if source : columns . append ( ( 'f:s_%s' % source ) ) if need_timestamp : columns . extend ( [ 'f:rts' , 'f:timestamp' ] ) return columns
return a list of required columns in meter table to be scanned .