| 1282 | } |
| 1283 | |
| 1284 | bool HdfsOrcScanner::PrepareInListPredicate(uint64_t orc_column_id, |
| 1285 | const ColumnType& type, ScalarExprEvaluator* eval, |
| 1286 | orc::SearchArgumentBuilder* sarg) { |
| 1287 | std::vector<orc::Literal> in_list; |
| 1288 | // Initialize 'predicate_type' to avoid clang-tidy warning. |
| 1289 | orc::PredicateDataType predicate_type = orc::PredicateDataType::BOOLEAN; |
| 1290 | for (int i = 1; i < eval->root().children().size(); ++i) { |
| 1291 | // ORC reader only supports pushing down predicates whose constant parts are literal. |
| 1292 | // FE shouldn't push down any non-literal expr here. |
| 1293 | DCHECK(eval->root().GetChild(i)->IsLiteral()) |
| 1294 | << "Non-literal constant expr cannot be used"; |
| 1295 | in_list.emplace_back(GetSearchArgumentLiteral(eval, i, type, &predicate_type)); |
| 1296 | } |
| 1297 | return PrepareInListPredicate(orc_column_id, type, in_list, sarg); |
| 1298 | } |
| 1299 | |
| 1300 | bool HdfsOrcScanner::PrepareInListPredicate(uint64_t orc_column_id, |
| 1301 | const ColumnType& type, const std::vector<orc::Literal>& in_list, |