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

Method CreatePartKeyExprs

be/src/runtime/descriptors.cc:578–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576}
577
578Status DescriptorTbl::CreatePartKeyExprs(
579 const HdfsTableDescriptor& hdfs_tbl, ObjectPool* pool) {
580 // Prepare and open partition exprs
581 for (const auto& part_entry : hdfs_tbl.partition_descriptors()) {
582 HdfsPartitionDescriptor* part_desc = part_entry.second;
583 vector<ScalarExpr*> partition_key_value_exprs;
584 RETURN_IF_ERROR(ScalarExpr::Create(part_desc->thrift_partition_key_exprs_,
585 RowDescriptor(), nullptr, pool, &partition_key_value_exprs));
586 for (const ScalarExpr* partition_expr : partition_key_value_exprs) {
587 DCHECK(partition_expr->IsLiteral());
588 DCHECK(!partition_expr->HasFnCtx());
589 DCHECK_EQ(partition_expr->GetNumChildren(), 0);
590 }
591 // TODO: RowDescriptor should arguably be optional in Prepare for known literals.
592 // Partition exprs are not used in the codegen case. Don't codegen them.
593 RETURN_IF_ERROR(ScalarExprEvaluator::Create(partition_key_value_exprs, nullptr,
594 pool, nullptr, nullptr, &part_desc->partition_key_value_evals_));
595 RETURN_IF_ERROR(ScalarExprEvaluator::Open(
596 part_desc->partition_key_value_evals_, nullptr));
597 }
598 return Status::OK();
599}
600
601Status DescriptorTbl::DeserializeThrift(const TDescriptorTableSerialized& serial_tbl,
602 TDescriptorTable* desc_tbl) {

Callers

nothing calls this directly

Calls 6

CreateClass · 0.85
OKFunction · 0.85
GetNumChildrenMethod · 0.80
RowDescriptorClass · 0.70
IsLiteralMethod · 0.45
HasFnCtxMethod · 0.45

Tested by

no test coverage detected