File tree Expand file tree Collapse file tree
velox/connectors/hive/iceberg Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -409,8 +409,28 @@ void IcebergDataSink::computePartitionAndBucketIds(const RowVectorPtr& input) {
409409 VELOX_CHECK (isPartitioned ());
410410 VELOX_CHECK_NOT_NULL (transformEvaluator_);
411411 VELOX_CHECK_NOT_NULL (partitionIdGenerator_);
412+ std::vector<VectorPtr> children;
413+ children.reserve (input->childrenSize ());
414+
415+ for (column_index_t i = 0 ; i < input->childrenSize (); ++i) {
416+ VELOX_CHECK (
417+ input->childAt (i)->type ()->equivalent (*inputType_->childAt (i)),
418+ " Iceberg write input type mismatch at column {}. Expected {}, got {}." ,
419+ i,
420+ inputType_->childAt (i)->toString (),
421+ input->childAt (i)->type ()->toString ());
422+
423+ children.push_back (input->childAt (i));
424+ }
425+
426+ auto inputForTransforms = std::make_shared<RowVector>(
427+ input->pool (),
428+ inputType_,
429+ input->nulls (),
430+ input->size (),
431+ std::move (children));
412432 // Step 1: Apply transforms to input partition columns.
413- auto transformedColumns = transformEvaluator_->evaluate (input );
433+ auto transformedColumns = transformEvaluator_->evaluate (inputForTransforms );
414434
415435 // Step 2: Create RowVector based on transformed columns.
416436 const auto & transformedRowVector = std::make_shared<RowVector>(
You can’t perform that action at this time.
0 commit comments