DataSQRL/sqrl

Timestamp detection in cast

Opened this issue · 0 comments

In a left join, Calcite adds additional casts for columns (not sure why). That means, timestamp columns aren't detected and separately appended which duplicates that column.

For example, changing this line ResolveTest#topNTest produces the error:

Customer.recentOrders := SELECT o.id, o.time FROM @ LEFT JOIN Orders o WHERE @.customerid = o.customerid ORDER BY o.time DESC LIMIT 10;"

This should be fixed if we consider CAST a timestamp preserving function.