

def _timestamp_literal_format(expr):
    value = expr.op().value
    if isinstance(value, datetime.datetime):
        if (value.microsecond != 0):
            raise ValueError(value)
        value = value.strftime('%Y-%m-%d %H:%M:%S')
    return "'{0!s}'".format(value)

dataset/ETHPy150Open cloudera/ibis/ibis/impala/compiler.py _timestamp_literal_format/original