@@ -77,10 +77,7 @@ TConclusion<std::shared_ptr<TDataContainer>> AdaptColumnsImpl(
7777 columns.push_back (srcBatch->column (index));
7878 fields.emplace_back (field);
7979 auto srcField = srcBatch->schema ()->field (index);
80- if (field->Equals (srcField)) {
81- AFL_VERIFY (columns.back ()->type ()->Equals (field->type ()))(" event" , " cannot_use_incoming_batch" )(" reason" , " invalid_column_type" )(
82- " column" , field->name ())(" column_type" , field->type ()->ToString ())(" incoming_type" , columns.back ()->type ()->ToString ());
83- } else {
80+ if (!field->type ()->Equals (srcField->type ())) {
8481 AFL_ERROR (NKikimrServices::ARROW_HELPER)(" event" , " cannot_use_incoming_batch" )(" reason" , " invalid_column_type" )(
8582 " column" , field->name ())(" column_type" , field->ToString (true ))(" incoming_type" , srcField->ToString (true ));
8683 return TConclusionStatus::Fail (" incompatible column types" );
@@ -286,13 +283,13 @@ TConclusion<std::shared_ptr<TDataContainer>> AdaptIncomingToDestinationExtImpl(c
286283 const auto & dstField = dstSchema->GetFieldByIndexVerified (dstIndex);
287284 switch (differentColumnTypesPolicy) {
288285 case TColumnOperator::ECheckFieldTypesPolicy::Verify:
289- AFL_VERIFY (dstField->Equals (srcField))(" event" , " cannot_use_incoming_batch" )(" reason" , " invalid_column_type" )(
286+ AFL_VERIFY (dstField->type ()-> Equals (srcField-> type () ))(" event" , " cannot_use_incoming_batch" )(" reason" , " invalid_column_type" )(
290287 " dst_column" , dstField->ToString (true ))(" src_column" , srcField->ToString (true ));
291288 break ;
292289 case TColumnOperator::ECheckFieldTypesPolicy::Error:
293- if (!dstField->Equals (srcField)) {
290+ if (!dstField->type ()-> Equals (srcField-> type () )) {
294291 AFL_ERROR (NKikimrServices::ARROW_HELPER)(" event" , " cannot_use_incoming_batch" )(" reason" , " invalid_column_type" )(
295- " dst_column" , dstField->ToString (true ))(" src_column" , srcField->ToString (true ));
292+ " dst_column" , dstField->type ()-> ToString ())(" src_column" , srcField->type ()-> ToString ())( " name " , srcField-> name ( ));
296293 return TConclusionStatus::Fail (" incompatible column types for '" + dstField->name () + " '" );
297294 }
298295 break ;
0 commit comments