"With as" SQL clause, also referred as CTE, is known as a handy way to improve readability of the queries. As far as I understand in classic SQL CTE results are NOT cached, and each CTE is just replaced by relevant SQL, and not by resultset of relevant SQL.
So given I have a CTE in my Spark SQL:
with myCTE as (select * from someTable)
The resultSet from my CTE wont be cached and each time I will select from it - the table will be read by Spark again. Correct?