Ejemplo n.º 1
0
 public IEtlPipelineStep <TOut, TNextOut> Pivot <TNextOut>(IPivot <TOut, TNextOut> pivot)
 {
     if (pivot == null)
     {
         throw new ArgumentNullException(nameof(pivot));
     }
     return(Pivot(pivot.Pivot));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// UNPIVOT performs the opposite operation to PIVOT by rotating columns of a table-valued expression into column values. Note that UNPIVOT is not the exact reverse of PIVOT. PIVOT performs an aggregation and, therefore, merges possible multiple rows into a single row in the output. UNPIVOT does not reproduce the original table-valued expression result because rows have been merged.
 /// </summary>
 /// <param name="prev">A predecessor object.</param>
 /// <param name="valueColumn">Is a column that will hold the rotated values.</param>
 /// <param name="rotatingColumn">Is a rotating column whose values will become the rotated column names in the pivot table.</param>
 /// <param name="firstRotatedColumn">The first rotated column in the pivot table.</param>
 /// <param name="otherRotatedColumns">Other rotated columns in the pivot table.</param>
 public static PivotChainer Unpivot(this IPivot prev,
                                    NonSelectColumnArgument valueColumn,
                                    NonSelectColumnArgument rotatingColumn,
                                    string firstRotatedColumn, params string[] otherRotatedColumns)
 {
     return(new PivotChainer((Chainer)prev, valueColumn, rotatingColumn,
                             Common.MergeArrays <string>(firstRotatedColumn, otherRotatedColumns)));
 }
Ejemplo n.º 3
0
 public BeaconHeadersSyncFeed(
     IPoSSwitcher poSSwitcher,
     ISyncModeSelector syncModeSelector,
     IBlockTree?blockTree,
     ISyncPeerPool?syncPeerPool,
     ISyncConfig?syncConfig,
     ISyncReport?syncReport,
     IPivot?pivot,
     IMergeConfig?mergeConfig,
     IInvalidChainTracker invalidChainTracker,
     ILogManager logManager)
     : base(syncModeSelector, blockTree, syncPeerPool, syncConfig, syncReport, logManager,
            true) // alwaysStartHeaderSync = true => for the merge we're forcing header sync start. It doesn't matter if it is archive sync or fast sync
 {
     _poSSwitcher         = poSSwitcher ?? throw new ArgumentNullException(nameof(poSSwitcher));
     _pivot               = pivot ?? throw new ArgumentNullException(nameof(pivot));
     _mergeConfig         = mergeConfig ?? throw new ArgumentNullException(nameof(mergeConfig));
     _invalidChainTracker = invalidChainTracker;
     _logger              = logManager.GetClassLogger();
 }
Ejemplo n.º 4
0
 public MergeSynchronizer(
     IDbProvider dbProvider,
     ISpecProvider specProvider,
     IBlockTree blockTree,
     IReceiptStorage receiptStorage,
     ISyncPeerPool peerPool,
     INodeStatsManager nodeStatsManager,
     ISyncModeSelector syncModeSelector,
     ISyncConfig syncConfig,
     ISnapProvider snapProvider,
     IBlockDownloaderFactory blockDownloaderFactory,
     IPivot pivot,
     IPoSSwitcher poSSwitcher,
     IMergeConfig mergeConfig,
     IInvalidChainTracker invalidChainTracker,
     ILogManager logManager,
     ISyncReport syncReport)
     : base(
         dbProvider,
         specProvider,
         blockTree,
         receiptStorage,
         peerPool,
         nodeStatsManager,
         syncModeSelector,
         syncConfig,
         snapProvider,
         blockDownloaderFactory,
         pivot,
         syncReport,
         logManager)
 {
     _invalidChainTracker = invalidChainTracker;
     _poSSwitcher         = poSSwitcher;
     _mergeConfig         = mergeConfig;
 }