@@ -143,7 +143,7 @@ public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolid
143143 var inputs = Source . GetRowCursorSet ( out consolidator , predicateInput , n , rand ) ;
144144 Contracts . AssertNonEmpty ( inputs ) ;
145145
146- if ( inputs . Length == 1 && n > 1 && WantParallelCursors ( predicate ) )
146+ if ( inputs . Length == 1 && n > 1 && WantParallelCursors ( predicate ) && ( Source . GetRowCount ( ) ?? int . MaxValue ) > n )
147147 inputs = DataViewUtils . CreateSplitCursors ( out consolidator , Host , inputs [ 0 ] , n ) ;
148148 Contracts . AssertNonEmpty ( inputs ) ;
149149
@@ -432,14 +432,14 @@ protected override void GetMetadataCore<TValue>(string kind, int iinfo, ref TVal
432432 Contracts . Assert ( 0 <= iinfo && iinfo < InfoCount ) ;
433433 switch ( kind )
434434 {
435- case MetadataUtils . Kinds . ScoreColumnSetId :
436- _getScoreColumnSetId . Marshal ( iinfo , ref value ) ;
437- break ;
438- default :
439- if ( iinfo < DerivedColumnCount )
440- throw MetadataUtils . ExceptGetMetadata ( ) ;
441- Mapper . OutputSchema . GetMetadata < TValue > ( kind , iinfo - DerivedColumnCount , ref value ) ;
442- break ;
435+ case MetadataUtils . Kinds . ScoreColumnSetId :
436+ _getScoreColumnSetId . Marshal ( iinfo , ref value ) ;
437+ break ;
438+ default :
439+ if ( iinfo < DerivedColumnCount )
440+ throw MetadataUtils . ExceptGetMetadata ( ) ;
441+ Mapper . OutputSchema . GetMetadata < TValue > ( kind , iinfo - DerivedColumnCount , ref value ) ;
442+ break ;
443443 }
444444 }
445445
0 commit comments