提交 bebb211e authored 作者: Thomas Mueller's avatar Thomas Mueller

new experimental page store

上级 129a021d
......@@ -175,4 +175,8 @@ public class FunctionTable extends Table {
return function.getSQL();
}
public long getRowCountApproximation() {
return rowCount;
}
}
......@@ -64,6 +64,11 @@ import org.h2.value.ValueString;
*/
public class MetaTable extends Table {
/**
* The approximate number of rows of a meta table.
*/
public static final long ROW_COUNT_APPROXIMATION = 1000;
// TODO INFORMATION_SCHEMA.tables: select table_name
// from INFORMATION_SCHEMA.tables where TABLE_TYPE = 'BASE TABLE'
......@@ -1779,4 +1784,8 @@ public class MetaTable extends Table {
return META_TABLE_TYPE_COUNT;
}
public long getRowCountApproximation() {
return ROW_COUNT_APPROXIMATION;
}
}
......@@ -164,4 +164,8 @@ public class RangeTable extends Table {
return null;
}
public long getRowCountApproximation() {
return 100;
}
}
......@@ -242,6 +242,13 @@ public abstract class Table extends SchemaObjectBase {
*/
public abstract long getRowCount(Session session) throws SQLException;
/**
* Get the approximated row count for this table.
*
* @return the approximated row count
*/
public abstract long getRowCountApproximation();
public String getCreateSQLForCopy(Table table, String quotedName) {
throw Message.getInternalError();
}
......
......@@ -684,4 +684,8 @@ public class TableData extends Table implements RecordReader {
return containsLargeObject;
}
public long getRowCountApproximation() {
return scanIndex.getRowCountApproximation();
}
}
......@@ -38,6 +38,8 @@ import org.h2.value.DataType;
*/
public class TableLink extends Table {
private static final long ROW_COUNT_APPROXIMATION = 100000;
private String driver, url, user, password, originalSchema, originalTable, qualifiedTableName;
private TableLinkConnection conn;
private HashMap prepared = new HashMap();
......@@ -473,4 +475,8 @@ public class TableLink extends Table {
return conn;
}
public long getRowCountApproximation() {
return ROW_COUNT_APPROXIMATION;
}
}
......@@ -31,6 +31,8 @@ import org.h2.value.Value;
*/
public class TableView extends Table {
private static final long ROW_COUNT_APPROXIMATION = 100;
private String querySQL;
private ObjectArray tables;
private final String[] columnNames;
......@@ -355,4 +357,8 @@ public class TableView extends Table {
return v;
}
public long getRowCountApproximation() {
return ROW_COUNT_APPROXIMATION;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论