File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 13
13
from pyspark .sql import SparkSession
14
14
from pyspark .sql .column import Column
15
15
from pyspark .sql .dataframe import DataFrame
16
- from pyspark .sql .types import TimestampType
16
+ from pyspark .sql .types import StringType , TimestampType
17
17
from pyspark .sql .window import Window , WindowSpec
18
18
from scipy .fft import fft , fftfreq # type: ignore
19
19
@@ -64,7 +64,7 @@ def __init__(
64
64
# this if clause seems unneeded. Perhaps we should check for non-valid
65
65
# Timestamp string matching then do some pattern matching to extract
66
66
# the time stamp.
67
- if df .schema [ts_col ].dataType == " StringType" : # pragma: no cover
67
+ if isinstance ( df .schema [ts_col ].dataType , StringType ) : # pragma: no cover
68
68
sample_ts = df .limit (1 ).collect ()[0 ][0 ]
69
69
self .__validate_ts_string (sample_ts )
70
70
self .df = self .__add_double_ts ().withColumnRenamed ("double_ts" , self .ts_col )
You can’t perform that action at this time.
0 commit comments