spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aakash Basu <>
Subject unix_timestamp() equivalent in plain Spark SQL Query
Date Fri, 03 Apr 2020 03:47:41 GMT

What is the unix_timestamp() function equivalent in a plain spark SQL query?

I want to subtract one timestamp column from another, but in plain SQL am
getting error "Should be numeric or calendarinterval and not timestamp."
But when I did through the above function inaide withColumn, it worked. But
I want to do if in case and am more handy with plain SQL rather than Spark
SQL functions.

Any guidance?


View raw message