@Override 
  public Integer visitTimestamp_literal(HplsqlParser.Timestamp_literalContext ctx) { 
    if (!exec.buildSql) {
      String str = evalPop(ctx.string()).toString();
      int len = str.length();
      int precision = 0;
      if (len > 19 && len <= 29) {
        precision = len - 20;
        if (precision > 3) {
          precision = 3;
        }
      }
      stackPush(new Var(Utils.toTimestamp(str), precision));
    }
    else {
      stackPush(getFormattedText(ctx));
    }
    return 0; 
  }
TIMESTAMP 'YYYY-MM-DD HH:MI:SS.FFF' literal
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java