// List of columns of this table that are nullable (and must have nulls pruned out) #endregion #region constructors /// <summary> /// Basic constructor /// </summary> /// <param name="id">node id</param> /// <param name="node">scan table node</param> internal AugmentedTableNode(int id, Node node) : base(id, node) { var scanTableOp = (ScanTableOp)node.Op; m_table = scanTableOp.Table; LastVisibleId = id; m_replacementTable = this; m_newLocationId = id; }
// <summary> // Maps columns of an existing table to those of the cloned table // </summary> // <param name="newTable"> The original Table </param> // <param name="oldTable"> The cloned Table </param> private void MapTable(Table newTable, Table oldTable) { // Map the corresponding columns of the table // Now set up the column map for (var i = 0; i < oldTable.Columns.Count; i++) { SetMappedVar(oldTable.Columns[i], newTable.Columns[i]); } }
// <summary> // Creates a new var for a table column // </summary> // <param name="table"> The table instance that produces the column </param> // <param name="columnMD"> column metadata </param> // <returns> A new ColumnVar instance that references the specified column in the given table </returns> internal virtual ColumnVar CreateColumnVar(Table table, ColumnMD columnMD) { // create a new column var now var c = new ColumnVar(NewVarId(), table, columnMD); table.Columns.Add(c); m_vars.Add(c); return c; }
// <summary> // Creates a new table instance // </summary> // <param name="tableMetadata"> table metadata </param> // <returns> A new Table instance with columns as defined in the specified metadata </returns> internal virtual Table CreateTableInstance(TableMD tableMetadata) { var t = new Table(this, tableMetadata, NewTableId()); m_tables.Add(t); return t; }
// <summary> // Creates a new UnnestOp - a variant of the above with the Table supplied // </summary> // <param name="v"> the unnest Var </param> // <param name="t"> the table instance </param> // <returns> a new UnnestOp </returns> internal virtual UnnestOp CreateUnnestOp(Var v, Table t) { return new UnnestOp(v, t); }
// <summary> // Creates an instance of a ScanViewOp // </summary> // <param name="table"> the table instance </param> // <returns> a new ScanViewOp </returns> internal virtual ScanViewOp CreateScanViewOp(Table table) { return new ScanViewOp(table); }