title: Filter column based on two conditions spark and Java
body: <p>I am trying to add a filter on my dataframe, for some reason the || condition is not working in Java, it works perfectly in Scala. The code doesn't even compile. How do we use || operator in filter condition in java</p>
  
  <p>The message says </p>
  
  <pre><code>The operator || is undefined for the argument type(s) org.apache.spark.sql.Column, org.apache.spark.sql.Column
  
  df.filter((df.col("eventNumbers").contains("2") )|| (df.col("eventNumbers").contains("45")))
  </code></pre>