spaceandtimelabs / sxt-proof-of-sql

Space and Time | Proof of SQL
Other
1.45k stars 31 forks source link

missing ge, eq, ineq implementations for TimeStampTZ #149

Open Dustin-Ray opened 1 week ago

Dustin-Ray commented 1 week ago

Here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/6740144a5d3d01583d264d2560e68ff5f0025b22/crates/proof-of-sql/src/base/database/owned_column_operation.rs#L182

Here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/6740144a5d3d01583d264d2560e68ff5f0025b22/crates/proof-of-sql/src/base/database/owned_column_operation.rs#L316

And Here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/6740144a5d3d01583d264d2560e68ff5f0025b22/crates/proof-of-sql/src/base/database/owned_column_operation.rs#L450

@iajoiner I must have forgotten about these when we wrapped up timestamp, sorry about that. What are the above lines used for? Because right now, full provable inequality is supported on timestamp-related queries:

"SELECT * FROM table WHERE times > timestamp '1970-01-01T00:00:00Z';",
"SELECT * FROM table WHERE times < timestamp '1970-01-01T00:00:00Z';",
"SELECT * FROM table WHERE times >= timestamp '1970-01-01T00:00:00Z';",
"SELECT * FROM table WHERE times <= timestamp '1970-01-01T00:00:00Z';",
"SELECT * FROM table WHERE times = timestamp '1970-01-01T00:00:00Z';",

All succeed without incident. Should I fill out these missing implementations marked as todo!()?

iajoiner commented 1 week ago

@drcapybara Yup! These should be filled out.

JayWhite2357 commented 1 week ago

If I'm not mistaken, these are only used in postprocessing, which is why those queries still work: they don't use postprocessing. Regardless, these should be filled out.