PARQUET-2123: [C++] Fix invalid memory access in ScanFileContents
PARQUET-2123: [C++] Fix invalid memory access in ScanFileContents

ScanFileContents assumes that there is at least one column and returns
the number of rows in total_rows[0], which is technically invalid when
there are zero columns. Fix by returning early if there are zero
columns.

Closes #12423 from tachyonwill/skip_no_columns

Authored-by: William Butler <f3b57f9d8ccbac6da1a4fe3e345f474a7096ae8a@google.com>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

kou/arrow,kou/arrow,kou/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,icexelloss/arrow,icexelloss/arrow,icexelloss/arrow,wesm/arrow,kou/arrow,apache/arrow,apache/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,apache/arrow,wesm/arrow,icexelloss/arrow,icexelloss/arrow,kou/arrow,icexelloss/arrow,apache/arrow,kou/arrow,wesm/arrow,icexelloss/arrow,icexelloss/arrow,icexelloss/arrow,apache/arrow,icexelloss/arrow,apache/arrow,wesm/arrow,wesm/arrow,apache/arrow,apache/arrow,apache/arrow,icexelloss/arrow,kou/arrow,wesm/arrow,icexelloss/arrow,wesm/arrow,apache/arrow,wesm/arrow,kou/arrow,wesm/arrow,kou/arrow,wesm/arrow,apache/arrow,apache/arrow,kou/arrow,apache/arrow,kou/arrow,wesm/arrow,wesm/arrow,apache/arrow,kou/arrow