MCPcopy Create free account
hub / github.com/apache/impala / PrepareInListPredicate

Method PrepareInListPredicate

be/src/exec/orc/hdfs-orc-scanner.cc:1284–1298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1282}
1283
1284bool 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
1300bool HdfsOrcScanner::PrepareInListPredicate(uint64_t orc_column_id,
1301 const ColumnType& type, const std::vector<orc::Literal>& in_list,

Callers

nothing calls this directly

Calls 6

childrenMethod · 0.80
rootMethod · 0.80
GetChildMethod · 0.80
sizeMethod · 0.45
IsLiteralMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected