

@compiles(sa.sql.elements.Extract, 'hive')
def hive_extract_to_date_function(element, compiler, **kwargs):
    func = getattr(sa.func, element.field)(element.expr)
    return compiler.visit_function(func, **kwargs)

dataset/ETHPy150Open blaze/blaze/blaze/compute/sql.py hive_extract_to_date_function/original