jsdataframe.js
function appendJoinRow(arrayCols, keyDf, leftNonKeyDf, rightNonKeyDf,
  leftInd, rightInd, indicatorValue, rightIndForKey) {

  var keyInd = rightIndForKey ? rightInd : leftInd;
  var i, nCol;
  var colInd = 0;
  nCol = keyDf.nCol();
  for (i = 0; i < nCol; i++) {
    arrayCols[colInd].push(keyDf._cols[i].values[keyInd]);
    colInd++;
  }
  nCol = leftNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var leftVal = (leftInd === null) ? null :
      leftNonKeyDf._cols[i].values[leftInd];
    arrayCols[colInd].push(leftVal);
    colInd++;
  }
  nCol = rightNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var rightVal = (rightInd === null) ? null :
      rightNonKeyDf._cols[i].values[rightInd];
    arrayCols[colInd].push(rightVal);
    colInd++;
  }
  if (colInd < arrayCols.length) {
    // Add the join indicator value if there's a final column for it
    arrayCols[colInd].push(indicatorValue);
  }
}
function appendJoinRow(arrayCols, keyDf, leftNonKeyDf, rightNonKeyDf,
  leftInd, rightInd, indicatorValue, rightIndForKey) {

  var keyInd = rightIndForKey ? rightInd : leftInd;
  var i, nCol;
  var colInd = 0;
  nCol = keyDf.nCol();
  for (i = 0; i < nCol; i++) {
    arrayCols[colInd].push(keyDf._cols[i].values[keyInd]);
    colInd++;
  }
  nCol = leftNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var leftVal = (leftInd === null) ? null :
      leftNonKeyDf._cols[i].values[leftInd];
    arrayCols[colInd].push(leftVal);
    colInd++;
  }
  nCol = rightNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var rightVal = (rightInd === null) ? null :
      rightNonKeyDf._cols[i].values[rightInd];
    arrayCols[colInd].push(rightVal);
    colInd++;
  }
  if (colInd < arrayCols.length) {
    // Add the join indicator value if there's a final column for it
    arrayCols[colInd].push(indicatorValue);
  }
}
function appendJoinRow ( arrayCols , keyDf , leftNonKeyDf , rightNonKeyDf , leftInd , rightInd , indicatorValue , rightIndForKey ) { var keyInd = rightIndForKey ? rightInd : leftInd ; var i , nCol ; var colInd = 0 ; nCol = keyDf . nCol ( ) ; for ( i = 0 ; i < nCol ; i ++ ) { arrayCols [ colInd ] . push ( keyDf . _cols [ i ] . values [ keyInd ] ) ; colInd ++ ; } nCol = leftNonKeyDf . nCol ( ) ; for ( i = 0 ; i < nCol ; i ++ ) { var leftVal = ( leftInd === null ) ? null : leftNonKeyDf . _cols [ i ] . values [ leftInd ] ; arrayCols [ colInd ] . push ( leftVal ) ; colInd ++ ; } nCol = rightNonKeyDf . nCol ( ) ; for ( i = 0 ; i < nCol ; i ++ ) { var rightVal = ( rightInd === null ) ? null : rightNonKeyDf . _cols [ i ] . values [ rightInd ] ; arrayCols [ colInd ] . push ( rightVal ) ; colInd ++ ; } if ( colInd < arrayCols . length ) { // Add the join indicator value if there's a final column for it arrayCols [ colInd ] . push ( indicatorValue ) ; } }
Helper for appending values to "arrayCols" from "leftInd" and "rightInd"
Helper for appending values to arrayCols from leftInd and rightInd