

def get_default_exprs(self, col, col_type):
    if (col in self.col_blacklist):
        return {
            
        }
    d = {
        
    }
    d[(col, 'non_null')] = 'COUNT({col})'
    if (col_type in ['double', 'int', 'bigint', 'float', 'double']):
        d[(col, 'sum')] = 'SUM({col})'
        d[(col, 'min')] = 'MIN({col})'
        d[(col, 'max')] = 'MAX({col})'
        d[(col, 'avg')] = 'AVG({col})'
    elif (col_type == 'boolean'):
        d[(col, 'true')] = 'SUM(CASE WHEN {col} THEN 1 ELSE 0 END)'
        d[(col, 'false')] = 'SUM(CASE WHEN NOT {col} THEN 1 ELSE 0 END)'
    elif (col_type in ['string']):
        d[(col, 'len')] = 'SUM(CAST(LENGTH({col}) AS BIGINT))'
        d[(col, 'approx_distinct')] = 'APPROX_DISTINCT({col})'
    return {k: v.format(col=col) for (k, v) in d.items()}

dataset/ETHPy150Open airbnb/airflow/airflow/operators/hive_stats_operator.py HiveStatsCollectionOperator.get_default_exprs/original