Merging changes
This commit is contained in:
1 parent
c4216d2272
commit
797816be7e
437 files changed
+54228
-28
No files matched your search
@@ -0,0 +1,54 @@
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Linq;
|
||||
// using System.Text;
|
||||
|
||||
// namespace BCG
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// Same as a join except can join based on
|
||||
// /// multiple columns (this abstracts what we
|
||||
// /// have been doing for ages - concatenating,
|
||||
// /// joining and then projecting the concatanted
|
||||
// /// columns out)
|
||||
// /// </summary>
|
||||
// public class MultiColumnJoinStream : ViewStream
|
||||
// {
|
||||
// public MultiColumnJoinStream(ViewStream leftStream, string leftJoinColumns, string leftProject,
|
||||
// ViewStream rightStream, string rightJoinColumns, string rightProject)
|
||||
// : this(leftStream, leftJoinColumns, leftProject,
|
||||
// rightStream, rightJoinColumns, rightProject, false)
|
||||
// { }
|
||||
|
||||
// public MultiColumnJoinStream(ViewStream leftStream, string leftJoinColumns, string leftProject,
|
||||
// ViewStream rightStream, string rightJoinColumns, string rightProject, bool leftJoin)
|
||||
// {
|
||||
// string[] leftJoinColArray = leftJoinColumns.Split(' ', ',', ';'),
|
||||
// rightJoinColArray = rightJoinColumns.Split(' ', ',', ';');
|
||||
// if (leftJoinColArray.Length == 1 && rightJoinColArray.Length == 1)
|
||||
// /// so that this handles regular joins too
|
||||
// mySetRealSource(leftJoin ? new SuperLeftJoinStream(leftStream, leftJoinColArray[0], leftProject,
|
||||
// rightStream, rightJoinColArray[0], rightProject) :
|
||||
// new SuperJoinStream(leftStream, leftJoinColArray[0], leftProject,
|
||||
// rightStream, rightJoinColArray[0], rightProject));
|
||||
// else
|
||||
// {
|
||||
// string leftCols = "ljc:";
|
||||
// foreach (string c in leftJoinColArray)
|
||||
// leftCols += c + " ";
|
||||
// leftCols = leftCols.Trim();
|
||||
// string rightCols = "rjc:";
|
||||
// foreach (string c in rightJoinColArray)
|
||||
// rightCols += c + " ";
|
||||
// rightCols = rightCols.Trim();
|
||||
// ViewStream res =
|
||||
// leftJoin ? new SuperLeftJoinStream(new ConcatenateColumnsStream(leftStream, leftCols), "ljc", leftProject,
|
||||
// new ConcatenateColumnsStream(rightStream, rightCols), "rjc", rightProject) :
|
||||
// new SuperJoinStream(new ConcatenateColumnsStream(leftStream, leftCols), "ljc", leftProject,
|
||||
// new ConcatenateColumnsStream(rightStream, rightCols), "rjc", rightProject);
|
||||
// res = new ProjectStream(res, "!ljc rjc");
|
||||
// mySetRealSource(res);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in new issue
Block a user