Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ private SqlLibraryOperators() {
public static final SqlFunction TO_TIMESTAMP =
new SqlFunction("TO_TIMESTAMP",
SqlKind.OTHER_FUNCTION,
ReturnTypes.DATE_NULLABLE,
ReturnTypes.TIMESTAMP_NULLABLE,
null,
OperandTypes.STRING_STRING,
SqlFunctionCategory.TIMEDATE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1504,14 +1504,14 @@ public void _testLikeAndSimilarFails() {
final SqlOperatorTable opTable = operatorTableFor(SqlLibrary.POSTGRESQL);
expr("TO_TIMESTAMP('2000-01-01 01:00:00', 'YYYY-MM-DD HH:MM:SS')")
.withOperatorTable(opTable)
.columnType("DATE NOT NULL");
.columnType("TIMESTAMP(0) NOT NULL");
wholeExpr("TO_TIMESTAMP('2000-01-01 01:00:00')")
.withOperatorTable(opTable)
.fails("Invalid number of arguments to function 'TO_TIMESTAMP'. "
+ "Was expecting 2 arguments");
expr("TO_TIMESTAMP(2000, 'YYYY')")
.withOperatorTable(opTable)
.columnType("DATE NOT NULL");
.columnType("TIMESTAMP(0) NOT NULL");
wholeExpr("TO_TIMESTAMP(2000, 'YYYY')")
.withOperatorTable(opTable)
.withTypeCoercion(false)
Expand Down