Spark 中定义的 col 和窗口方法在哪里



我找到了这个结构。

purchaseByCustomerPerHour = streamingDataFrame
.selectExpr(
"CustomerId",
"(UnitPrice * Quantity) as total_cost",
"InvoiceDate")
.groupBy(
col("CustomerId"), window(col("InvoiceDate"), "1 day"))
.sum("total_cost")

在哪里定义了colwindow方法?我在Spark的API文档中找不到它们。

找到了。它的 https://spark.apache.org/docs/2.2.0/api/scala/index.html#org.apache.spark.sql.functions$

我应该注意到同一代码中使用的import关键字

最新更新