Skip to content

Commit 00c136d

Browse files
takezoewendigo
authored andcommitted
Use parseError() in AstBuilder.visitDateTimeType
1 parent 74aad42 commit 00c136d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3422,7 +3422,7 @@ else if (context.base.getType() == TIMESTAMP) {
34223422
type = DateTimeDataType.Type.TIMESTAMP;
34233423
}
34243424
else {
3425-
throw new ParsingException("Unexpected datetime type: " + context.getText(), getLocation(context));
3425+
throw parseError("Unexpected datetime type: " + context.getText(), context);
34263426
}
34273427

34283428
return new DateTimeDataType(

0 commit comments

Comments
 (0)