diff --git a/cpp/src/io/orc/orc.cpp b/cpp/src/io/orc/orc.cpp index fa98105e859..6cec7bbe6f6 100644 --- a/cpp/src/io/orc/orc.cpp +++ b/cpp/src/io/orc/orc.cpp @@ -548,6 +548,7 @@ std::vector metadata::select_columns(std::vector use_names, } } } + CUDF_EXPECTS(selection.size() > 0, "Filtered out all columns"); } else { // For now, only select all leaf nodes for (int i = 1; i < get_num_columns(); ++i) { @@ -557,7 +558,6 @@ std::vector metadata::select_columns(std::vector use_names, } } } - CUDF_EXPECTS(use_names.empty() or selection.size() > 0, "Filtered out all columns"); return selection; }