-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sql): fix comparing Date columns with date literals #3862
Commits on Oct 17, 2023
-
chore(sql): implement Date comparisons
Consider this query: `select * from tab where date = '1970-01-01'` Without these new functions QuestDB resorts to picking the overloaded equal function which accepts 2 longs. Why? 1. There is no exact match for eq(Date, Date) - such function does not exist at all! 2. The date column is `DateColumn` and the Date type can be casted to Long. See the overloading priority: /* 7 DATE */, {DATE, TIMESTAMP, LONG} 3. The second parameter is `StrConstant` and String can be also casted to Long. Again, the overloading priority: /* 11 STRING */, {STRING, CHAR, DOUBLE, LONG, INT, FLOAT, SHORT, BYTE} 4. Hence, the function parser picks eq(Long, Long). But then the `StrFunction.getLong()` fails to parse '1970-01-01' as a long. It expects a simple number. It does not know it's supposed to treat the argument as a Date. The same query works if you change the column type from Date to Timestamp. Why? Timestamp does not rely on casting - it implements Timestamp-specific functions where necessary. So I copied this for Date.
Configuration menu - View commit details
-
Copy full SHA for fa7cd43 - Browse repository at this point
Copy the full SHA fa7cd43View commit details
Commits on Oct 18, 2023
-
support dates without any explicit timezone
treat such timestamps as UTC
Configuration menu - View commit details
-
Copy full SHA for 23ca87d - Browse repository at this point
Copy the full SHA 23ca87dView commit details -
explicit and implicit String -> Date casting tries to use the same pa…
…tterns also: more tests for Date casting
Configuration menu - View commit details
-
Copy full SHA for b0f2c03 - Browse repository at this point
Copy the full SHA b0f2c03View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad5ed44 - Browse repository at this point
Copy the full SHA ad5ed44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cd8356 - Browse repository at this point
Copy the full SHA 9cd8356View commit details
Commits on Oct 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0c9ad67 - Browse repository at this point
Copy the full SHA 0c9ad67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7861dd3 - Browse repository at this point
Copy the full SHA 7861dd3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f954113 - Browse repository at this point
Copy the full SHA f954113View commit details
Commits on Oct 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2835a07 - Browse repository at this point
Copy the full SHA 2835a07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91824cf - Browse repository at this point
Copy the full SHA 91824cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff20138 - Browse repository at this point
Copy the full SHA ff20138View commit details -
Configuration menu - View commit details
-
Copy full SHA for 319ad4e - Browse repository at this point
Copy the full SHA 319ad4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a81fd4 - Browse repository at this point
Copy the full SHA 3a81fd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a04dda - Browse repository at this point
Copy the full SHA 0a04ddaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 531d590 - Browse repository at this point
Copy the full SHA 531d590View commit details
Commits on Oct 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bd82f44 - Browse repository at this point
Copy the full SHA bd82f44View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9fabf4 - Browse repository at this point
Copy the full SHA d9fabf4View commit details -
Configuration menu - View commit details
-
Copy full SHA for aab69a3 - Browse repository at this point
Copy the full SHA aab69a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bd3ffd - Browse repository at this point
Copy the full SHA 5bd3ffdView commit details -
Configuration menu - View commit details
-
Copy full SHA for df50ba9 - Browse repository at this point
Copy the full SHA df50ba9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f268df7 - Browse repository at this point
Copy the full SHA f268df7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a570817 - Browse repository at this point
Copy the full SHA a570817View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41fefc2 - Browse repository at this point
Copy the full SHA 41fefc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccfef4a - Browse repository at this point
Copy the full SHA ccfef4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 88202b3 - Browse repository at this point
Copy the full SHA 88202b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a287a9c - Browse repository at this point
Copy the full SHA a287a9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c11e0ef - Browse repository at this point
Copy the full SHA c11e0efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 242638f - Browse repository at this point
Copy the full SHA 242638fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89d8ffc - Browse repository at this point
Copy the full SHA 89d8ffcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f64afa - Browse repository at this point
Copy the full SHA 8f64afaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e1f117 - Browse repository at this point
Copy the full SHA 6e1f117View commit details
Commits on Oct 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9ff8c32 - Browse repository at this point
Copy the full SHA 9ff8c32View commit details -
experiment: avoid special-casing in FunctionParser
for =() only. for now.
Configuration menu - View commit details
-
Copy full SHA for 08a6963 - Browse repository at this point
Copy the full SHA 08a6963View commit details
Commits on Oct 27, 2023
-
Revert "experiment: avoid special-casing in FunctionParser"
This reverts commit 08a6963.
Configuration menu - View commit details
-
Copy full SHA for 4ac28f4 - Browse repository at this point
Copy the full SHA 4ac28f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a904f5 - Browse repository at this point
Copy the full SHA 1a904f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf5694c - Browse repository at this point
Copy the full SHA bf5694cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b6b8ad - Browse repository at this point
Copy the full SHA 0b6b8adView commit details
Commits on Oct 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9797707 - Browse repository at this point
Copy the full SHA 9797707View commit details