title: Or operator inside When function Spark Java API
body: <p>How to use Or operation inside when function in Spark Java API. I want something like this but I get a compiler error.</p>
  
  <pre><code>Dataset&lt;Row&gt; ds = ds1.withColumn("Amount2", when(ds2.col("Type").equalTo("A") Or ds2.col("Type").equalTo("B"), "Amount1").otherwise(0))
  </code></pre>
  
  <p>Can somebody guide me please with a sample expression.</p>