returnfmt.Sprintf("extract(epoch from %s) as \"time\"",args[0]),nil
case"__timeFilter":
// don't use to_timestamp in this macro for redshift compatibility #9566
iflen(args)==0{
return"",fmt.Errorf("missing time column argument for macro %v",name)
}
returnfmt.Sprintf("extract(epoch from %s) BETWEEN %d AND %d",args[0],m.TimeRange.GetFromAsSecondsEpoch(),m.TimeRange.GetToAsSecondsEpoch()),nil
returnfmt.Sprintf("%s BETWEEN '%s' AND '%s'",args[0],m.TimeRange.GetFromAsTimeUTC().Format(time.RFC3339),m.TimeRange.GetToAsTimeUTC().Format(time.RFC3339)),nil