在发送文件时,我收到一个字节数组。我总是遇到 webflux 接收数组的问题。抛出的错误如下:
org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
at org.springframework.core.io.buffer.LimitedDataBufferList.raiseLimitException(LimitedDataBufferList.java:101)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException
Run Code Online (Sandbox Code Playgroud)
你现在如何在 webflux 中解决这个问题?
我想在这样的时候评估两个条件: -
import pyspark.sql.functions as F
df = df.withColumn(
'trueVal', F.when(df.value < 1 OR df.value2 == 'false' , 0 ).otherwise(df.value))
Run Code Online (Sandbox Code Playgroud)
为此我使用'OR'得到'无效语法'
即使我尝试使用嵌套的when语句: -
df = df.withColumn(
'v',
F.when(df.value < 1,(F.when( df.value =1,0).otherwise(df.value))).otherwise(df.value)
)
Run Code Online (Sandbox Code Playgroud)
为此,我得到'keyword can't be an expression'嵌套的when语句.
我怎么能在when任何工作中使用多个条件?