如何验证传入的日期是..并将其与当前时间戳( yyyyMMDD格式)进行比较,直至当前月份。如果传入的日期(即)月份超过当前月份,则拒绝其他日期字段。在sparksql中使用from_unix_time(unix_timestamp)进行验证。在case when语句中需要(spark-sql) 例如: 编辑: spark.sql("select case when (length( date )>0 == from
我有一个dataframe df和一个列名为setp的列来创建我编写的列表。distinct().collect()setp_array= str(setp_array)[1:-1] 我想在spark.sql语句中使用它 df1=spark.sql(f"select * from table where setp in ({setp_array})").我不确定如
我正在尝试从spark-sql中的SQL语句中获取Integer。var num_en = ctx.sql("SELECT count(*) FROM table WHERE lang = 'en'")num_en是一个SchemaRDD,根据我得到的错误,num是一个“行”。<console>:144: error: type mismatch;
found