[SPARK-2135][SQL] Use planner for in-memory scans