You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pyhive sqlachemy dialect can not do 'where' filtering for dates/timestamps with year lower than 1000 because leading zeros are omitted when %Y is used.
Years 1-999 are rare is real use, but may be used for relative timestamps for example, or when only time part is used.
This problem may appear on some systems depending of strftime implementation of system libraries. See https://bugs.python.org/issue13305
This is a issue with python itself, but a workaround can be implemented for this case.
One solution is to use %04Y to set fixed with of 4, but it is also platform dependent.
Another is to use hack:
Pyhive sqlachemy dialect can not do 'where' filtering for dates/timestamps with year lower than 1000 because leading zeros are omitted when %Y is used.
Years 1-999 are rare is real use, but may be used for relative timestamps for example, or when only time part is used.
This problem may appear on some systems depending of strftime implementation of system libraries. See https://bugs.python.org/issue13305
problematic method: pyhive.common.ParamEscaper.escape_datetime
This is a issue with python itself, but a workaround can be implemented for this case.
One solution is to use %04Y to set fixed with of 4, but it is also platform dependent.
Another is to use hack:
This should be portable.
Reproduce
The text was updated successfully, but these errors were encountered: