Skip to content

Commit 654c512

Browse files
committed
bug fix: window operator miss the watermark metadata of time column
1 parent 990af63 commit 654c512

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/pyspark/sql/functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,10 @@ def check_string_field(field, fieldName):
11631163
raise TypeError("%s should be provided as a string" % fieldName)
11641164

11651165
sc = SparkContext._active_spark_context
1166-
time_col = _to_java_column(timeColumn)
1166+
if isinstance(timeColumn, Column):
1167+
raise TypeError("timeColumn should be the name of time column, and provided as a string.")
1168+
else:
1169+
time_col = _to_java_column(timeColumn)
11671170
check_string_field(windowDuration, "windowDuration")
11681171
if slideDuration and startTime:
11691172
check_string_field(slideDuration, "slideDuration")

0 commit comments

Comments
 (0)