|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkdl.prox.dbmgr.NST
kdl.prox.qgraph2.algebra.experiments.MonitoredNST
public class MonitoredNST
MonitoredNST is a subclass of NST. It has no new behavior except that it monitors the main operations, recording running time, result size, etc. and writes this information to the log.
It is a subclass so that other classes (e.g., QGTable) treats it like an NST. Author: mhay
| Field Summary |
|---|
| Fields inherited from class kdl.prox.dbmgr.NST |
|---|
columnList, isReleased, topBATName |
| Constructor Summary | |
|---|---|
MonitoredNST(java.lang.String[] colBATs,
java.lang.String[] colNames,
java.lang.String[] colTypes)
|
|
| Method Summary | |
|---|---|
NST |
addConstantColumn(java.lang.String colName,
java.lang.String type,
java.lang.String value)
Adds a new column to the NST, of the specified type, and with all rows with the same specified value. |
NST |
addDistinctCountColumn(java.lang.String baseColName,
java.lang.String changingColName,
java.lang.String colName)
Adds a column with the count of unique values in column changingColName for each different value of baseColName. |
NST |
addNumberColumn(java.lang.String newColName)
Adds a column to the NST with a numbering 0-n (as oid) |
NST |
copy()
Returns a copy of this NST |
NST |
distinct()
|
NST |
filter(java.lang.String filterDef)
|
NST |
filter(java.lang.String filterDef,
java.lang.String colList)
Returns a MATERIALIZED NST with the filter and set of columns and the selected rows. |
NST |
groupBy(java.lang.String colList,
java.lang.String newColName)
Adds a column at the end of the NST named newColName in which different values correspond to different values in the specified columns If the newColName column already exists, it deletes it. |
NST |
insertRowsFromNST(NST otherNST)
Gets all the rows from the second NST and inserts them into me. |
NST |
join(NST otherNST,
java.lang.String[] firstColNames,
java.lang.String[] secondColNames)
|
static MonitoredNST |
makeFromNST(NST nst)
|
NST |
projectDistinct(java.lang.String colList)
Selects a set of columns, using the filter command, and then applies a unique. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MonitoredNST(java.lang.String[] colBATs,
java.lang.String[] colNames,
java.lang.String[] colTypes)
| Method Detail |
|---|
public NST addConstantColumn(java.lang.String colName,
java.lang.String type,
java.lang.String value)
NST
addConstantColumn in class NSTtype - -- null gets the type from Monetvalue - -- null writes a nil
public NST addDistinctCountColumn(java.lang.String baseColName,
java.lang.String changingColName,
java.lang.String colName)
NSTA B ----- 1 A 1 B 1 C ! B 2 X 2 Y 3 AIt will create a new column (colName) at the end of the NST with the following values
A B cnt ---------- 1 A 3 1 B 3 1 C 3 1 B 3 2 X 2 2 Y 2 3 A 1It works by first putting in a single BAT the baseColName and changingColName tails, then finding the distinct (baseColName, changingColName) combinations, and then doing a histogram based on baseColName. Finally, the resulting BAT with (baseColName | distinct count) is joined with baseColName, so as to expand it and have a row for every row in the NST. This join is added as a new column in the NST.
addDistinctCountColumn in class NSTpublic NST addNumberColumn(java.lang.String newColName)
NST
addNumberColumn in class NSTpublic NST copy()
NST
copy in class NSTpublic NST distinct()
distinct in class NSTpublic NST filter(java.lang.String filterDef)
filter in class NST
public NST filter(java.lang.String filterDef,
java.lang.String colList)
NST
filter in class NSTcolList - (optional, "*" by default)
class for information about the filterDef,
method for information about the colList
public NST groupBy(java.lang.String colList,
java.lang.String newColName)
NST
groupBy in class NSTnewColName - (optional, group_id by default)public NST insertRowsFromNST(NST otherNST)
NST
insertRowsFromNST in class NST
public NST join(NST otherNST,
java.lang.String[] firstColNames,
java.lang.String[] secondColNames)
join in class NSTpublic static MonitoredNST makeFromNST(NST nst)
public NST projectDistinct(java.lang.String colList)
NST
projectDistinct in class NST
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||