-
Notifications
You must be signed in to change notification settings - Fork 50
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
withRangeStats not recognizing Timestamp field #397
Labels
bug
Something isn't working
Comments
How very annoying! This is definitely not the right way to test the dataType anyway. I'll see about updating this ASAP! |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: When a Timestamp column is specified as the
ts_col
for atsdf
, it does not get accurately interpreted as a Timestamp field in the logic that handlesrangeBackWindowSecs
.Root Cause: In tsdf.py,
def withRangeStats()
, the following code never evaluates to True because thestr
representation of the dataType isTimestampType()
, while the code expectsTimestampType
. The line causing the error is 1105:if str(self.df.schema[self.ts_col].dataType) == "TimestampType":
Setup:
tsdf = tempo.TSDF(df, ts_col='<timestamp_column>')
tsdf_2 = tsdf.withRangeStats("SIDE", rangeBackWindowSecs=300).df
Error:
Cannot resolve "(PARTITION BY <partition_col> ORDER BY DATE_TIME ASC NULLS FIRST RANGE BETWEEN -300 FOLLOWING AND CURRENT ROW)" due to data type mismatch: The data type "TIMESTAMP" used in the order specification does not match the data type "BIGINT" which is used in the range frame. SQLSTATE: 42K09;
The text was updated successfully, but these errors were encountered: