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

I'm not sure if I understand this correctly: is it because we don't know the count of all the rows that we must scan at least 1 column here? If so, I think we can simply record the count while building the in-memory columnar byte array to avoid scanning any columns.