Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

def sample(a:Column,b:Column):Column={ var c:Column=null ;c=a*(1-b);c} error: overloaded method value + with alternatives cannot be applied to (org.apache.spark.sql.Column)

SOLVED Go to solution
Highlighted

def sample(a:Column,b:Column):Column={ var c:Column=null ;c=a*(1-b);c} error: overloaded method value + with alternatives cannot be applied to (org.apache.spark.sql.Column)

New Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions

Re: def sample(a:Column,b:Column):Column={ var c:Column=null ;c=a*(1-b);c} error: overloaded method value + with alternatives cannot be applied to (org.apache.spark.sql.Column)

New Contributor

c=a*(lit(1)-b)

1 REPLY 1

Re: def sample(a:Column,b:Column):Column={ var c:Column=null ;c=a*(1-b);c} error: overloaded method value + with alternatives cannot be applied to (org.apache.spark.sql.Column)

New Contributor

c=a*(lit(1)-b)