repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
VoltDB/voltdb
src/frontend/org/voltdb/compiler/ProcedureCompiler.java
ProcedureCompiler.setCatalogProcedurePartitionInfo
public static void setCatalogProcedurePartitionInfo(VoltCompiler compiler, Database db, Procedure procedure, ProcedurePartitionData partitionData) throws VoltCompilerException { ParititonDataReturnType partitionClauseData = resolvePartitionData(compiler, db, procedure, partitionData....
java
public static void setCatalogProcedurePartitionInfo(VoltCompiler compiler, Database db, Procedure procedure, ProcedurePartitionData partitionData) throws VoltCompilerException { ParititonDataReturnType partitionClauseData = resolvePartitionData(compiler, db, procedure, partitionData....
[ "public", "static", "void", "setCatalogProcedurePartitionInfo", "(", "VoltCompiler", "compiler", ",", "Database", "db", ",", "Procedure", "procedure", ",", "ProcedurePartitionData", "partitionData", ")", "throws", "VoltCompilerException", "{", "ParititonDataReturnType", "pa...
Set partition table, column, and parameter index for catalog procedure
[ "Set", "partition", "table", "column", "and", "parameter", "index", "for", "catalog", "procedure" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ProcedureCompiler.java#L877-L895
train
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kafka10/KafkaStreamImporter.java
KafkaStreamImporter.createConsumerRunner
private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception { ClassLoader previous = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { Consumer<ByteBuffer, ByteBuffer...
java
private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception { ClassLoader previous = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { Consumer<ByteBuffer, ByteBuffer...
[ "private", "KafkaInternalConsumerRunner", "createConsumerRunner", "(", "Properties", "properties", ")", "throws", "Exception", "{", "ClassLoader", "previous", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "Thread", ".", ...
Create a Kafka consumer and runner. @param properties Kafka consumer properties @throws Exception on error
[ "Create", "a", "Kafka", "consumer", "and", "runner", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kafka10/KafkaStreamImporter.java#L72-L83
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.createSchema
void createSchema(HsqlName name, Grantee owner) { SqlInvariants.checkSchemaNameNotSystem(name.name); Schema schema = new Schema(name, owner); schemaMap.add(name.name, schema); }
java
void createSchema(HsqlName name, Grantee owner) { SqlInvariants.checkSchemaNameNotSystem(name.name); Schema schema = new Schema(name, owner); schemaMap.add(name.name, schema); }
[ "void", "createSchema", "(", "HsqlName", "name", ",", "Grantee", "owner", ")", "{", "SqlInvariants", ".", "checkSchemaNameNotSystem", "(", "name", ".", "name", ")", ";", "Schema", "schema", "=", "new", "Schema", "(", "name", ",", "owner", ")", ";", "schema...
Creates a schema belonging to the given grantee.
[ "Creates", "a", "schema", "belonging", "to", "the", "given", "grantee", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L104-L111
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getSchemaHsqlName
public HsqlName getSchemaHsqlName(String name) { if (name == null) { return defaultSchemaHsqlName; } if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) { return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME; } Schema schema = ((Schema) schemaMap.get(name));...
java
public HsqlName getSchemaHsqlName(String name) { if (name == null) { return defaultSchemaHsqlName; } if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) { return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME; } Schema schema = ((Schema) schemaMap.get(name));...
[ "public", "HsqlName", "getSchemaHsqlName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "defaultSchemaHsqlName", ";", "}", "if", "(", "SqlInvariants", ".", "INFORMATION_SCHEMA", ".", "equals", "(", "name", ")", ")", ...
If schemaName is null, return the default schema name, else return the HsqlName object for the schema. If schemaName does not exist, throw.
[ "If", "schemaName", "is", "null", "return", "the", "default", "schema", "name", "else", "return", "the", "HsqlName", "object", "for", "the", "schema", ".", "If", "schemaName", "does", "not", "exist", "throw", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L269-L286
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.isSchemaAuthorisation
boolean isSchemaAuthorisation(Grantee grantee) { Iterator schemas = allSchemaNameIterator(); while (schemas.hasNext()) { String schemaName = (String) schemas.next(); if (grantee.equals(toSchemaOwner(schemaName))) { return true; } } ...
java
boolean isSchemaAuthorisation(Grantee grantee) { Iterator schemas = allSchemaNameIterator(); while (schemas.hasNext()) { String schemaName = (String) schemas.next(); if (grantee.equals(toSchemaOwner(schemaName))) { return true; } } ...
[ "boolean", "isSchemaAuthorisation", "(", "Grantee", "grantee", ")", "{", "Iterator", "schemas", "=", "allSchemaNameIterator", "(", ")", ";", "while", "(", "schemas", ".", "hasNext", "(", ")", ")", "{", "String", "schemaName", "=", "(", "String", ")", "schema...
is a grantee the authorization of any schema
[ "is", "a", "grantee", "the", "authorization", "of", "any", "schema" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L316-L329
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.dropSchemas
void dropSchemas(Grantee grantee, boolean cascade) { HsqlArrayList list = getSchemas(grantee); Iterator it = list.iterator(); while (it.hasNext()) { Schema schema = (Schema) it.next(); dropSchema(schema.name.name, cascade); } }
java
void dropSchemas(Grantee grantee, boolean cascade) { HsqlArrayList list = getSchemas(grantee); Iterator it = list.iterator(); while (it.hasNext()) { Schema schema = (Schema) it.next(); dropSchema(schema.name.name, cascade); } }
[ "void", "dropSchemas", "(", "Grantee", "grantee", ",", "boolean", "cascade", ")", "{", "HsqlArrayList", "list", "=", "getSchemas", "(", "grantee", ")", ";", "Iterator", "it", "=", "list", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext"...
drop all schemas with the given authorisation
[ "drop", "all", "schemas", "with", "the", "given", "authorisation" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L334-L344
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getAllTables
public HsqlArrayList getAllTables() { Iterator schemas = allSchemaNameIterator(); HsqlArrayList alltables = new HsqlArrayList(); while (schemas.hasNext()) { String name = (String) schemas.next(); HashMappedList current = getTables(name); a...
java
public HsqlArrayList getAllTables() { Iterator schemas = allSchemaNameIterator(); HsqlArrayList alltables = new HsqlArrayList(); while (schemas.hasNext()) { String name = (String) schemas.next(); HashMappedList current = getTables(name); a...
[ "public", "HsqlArrayList", "getAllTables", "(", ")", "{", "Iterator", "schemas", "=", "allSchemaNameIterator", "(", ")", ";", "HsqlArrayList", "alltables", "=", "new", "HsqlArrayList", "(", ")", ";", "while", "(", "schemas", ".", "hasNext", "(", ")", ")", "{...
Returns an HsqlArrayList containing references to all non-system tables and views. This includes all tables and views registered with this Database.
[ "Returns", "an", "HsqlArrayList", "containing", "references", "to", "all", "non", "-", "system", "tables", "and", "views", ".", "This", "includes", "all", "tables", "and", "views", "registered", "with", "this", "Database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L382-L395
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getTable
public Table getTable(Session session, String name, String schema) { Table t = null; if (schema == null) { t = findSessionTable(session, name, schema); } if (t == null) { schema = session.getSchemaName(schema); t = findUserTable(session, name, ...
java
public Table getTable(Session session, String name, String schema) { Table t = null; if (schema == null) { t = findSessionTable(session, name, schema); } if (t == null) { schema = session.getSchemaName(schema); t = findUserTable(session, name, ...
[ "public", "Table", "getTable", "(", "Session", "session", ",", "String", "name", ",", "String", "schema", ")", "{", "Table", "t", "=", "null", ";", "if", "(", "schema", "==", "null", ")", "{", "t", "=", "findSessionTable", "(", "session", ",", "name", ...
Returns the specified user-defined table or view visible within the context of the specified Session, or any system table of the given name. It excludes any temp tables created in other Sessions. Throws if the table does not exist in the context.
[ "Returns", "the", "specified", "user", "-", "defined", "table", "or", "view", "visible", "within", "the", "context", "of", "the", "specified", "Session", "or", "any", "system", "table", "of", "the", "given", "name", ".", "It", "excludes", "any", "temp", "t...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L470-L495
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getUserTable
public Table getUserTable(Session session, String name, String schema) { Table t = findUserTable(session, name, schema); if (t == null) { throw Error.error(ErrorCode.X_42501, name); } return t; }
java
public Table getUserTable(Session session, String name, String schema) { Table t = findUserTable(session, name, schema); if (t == null) { throw Error.error(ErrorCode.X_42501, name); } return t; }
[ "public", "Table", "getUserTable", "(", "Session", "session", ",", "String", "name", ",", "String", "schema", ")", "{", "Table", "t", "=", "findUserTable", "(", "session", ",", "name", ",", "schema", ")", ";", "if", "(", "t", "==", "null", ")", "{", ...
Returns the specified user-defined table or view visible within the context of the specified Session. It excludes system tables and any temp tables created in different Sessions. Throws if the table does not exist in the context.
[ "Returns", "the", "specified", "user", "-", "defined", "table", "or", "view", "visible", "within", "the", "context", "of", "the", "specified", "Session", ".", "It", "excludes", "system", "tables", "and", "any", "temp", "tables", "created", "in", "different", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L507-L516
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.findUserTable
public Table findUserTable(Session session, String name, String schemaName) { Schema schema = (Schema) schemaMap.get(schemaName); if (schema == null) { return null; } if (session != null) { Table table = session.getLocalTable(name...
java
public Table findUserTable(Session session, String name, String schemaName) { Schema schema = (Schema) schemaMap.get(schemaName); if (schema == null) { return null; } if (session != null) { Table table = session.getLocalTable(name...
[ "public", "Table", "findUserTable", "(", "Session", "session", ",", "String", "name", ",", "String", "schemaName", ")", "{", "Schema", "schema", "=", "(", "Schema", ")", "schemaMap", ".", "get", "(", "schemaName", ")", ";", "if", "(", "schema", "==", "nu...
Returns the specified user-defined table or view visible within the context of the specified schema. It excludes system tables. Returns null if the table does not exist in the context.
[ "Returns", "the", "specified", "user", "-", "defined", "table", "or", "view", "visible", "within", "the", "context", "of", "the", "specified", "schema", ".", "It", "excludes", "system", "tables", ".", "Returns", "null", "if", "the", "table", "does", "not", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L523-L546
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.findSessionTable
public Table findSessionTable(Session session, String name, String schemaName) { return session.findSessionTable(name); }
java
public Table findSessionTable(Session session, String name, String schemaName) { return session.findSessionTable(name); }
[ "public", "Table", "findSessionTable", "(", "Session", "session", ",", "String", "name", ",", "String", "schemaName", ")", "{", "return", "session", ".", "findSessionTable", "(", "name", ")", ";", "}" ]
Returns the specified session context table. Returns null if the table does not exist in the context.
[ "Returns", "the", "specified", "session", "context", "table", ".", "Returns", "null", "if", "the", "table", "does", "not", "exist", "in", "the", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L552-L555
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.dropTableOrView
void dropTableOrView(Session session, Table table, boolean cascade) { // ft - concurrent session.commit(false); if (table.isView()) { removeSchemaObject(table.getName(), cascade); } else { dropTable(session, table, cascade); } }
java
void dropTableOrView(Session session, Table table, boolean cascade) { // ft - concurrent session.commit(false); if (table.isView()) { removeSchemaObject(table.getName(), cascade); } else { dropTable(session, table, cascade); } }
[ "void", "dropTableOrView", "(", "Session", "session", ",", "Table", "table", ",", "boolean", "cascade", ")", "{", "// ft - concurrent", "session", ".", "commit", "(", "false", ")", ";", "if", "(", "table", ".", "isView", "(", ")", ")", "{", "removeSchemaOb...
Drops the specified user-defined view or table from this Database object. <p> The process of dropping a table or view includes: <OL> <LI> checking that the specified Session's currently connected User has the right to perform this operation and refusing to proceed if not by throwing. <LI> checking for referential cons...
[ "Drops", "the", "specified", "user", "-", "defined", "view", "or", "table", "from", "this", "Database", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L582-L592
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getTableIndex
int getTableIndex(Table table) { Schema schema = (Schema) schemaMap.get(table.getSchemaName().name); if (schema == null) { return -1; } HsqlName name = table.getName(); return schema.tableList.getIndex(name.name); }
java
int getTableIndex(Table table) { Schema schema = (Schema) schemaMap.get(table.getSchemaName().name); if (schema == null) { return -1; } HsqlName name = table.getName(); return schema.tableList.getIndex(name.name); }
[ "int", "getTableIndex", "(", "Table", "table", ")", "{", "Schema", "schema", "=", "(", "Schema", ")", "schemaMap", ".", "get", "(", "table", ".", "getSchemaName", "(", ")", ".", "name", ")", ";", "if", "(", "schema", "==", "null", ")", "{", "return",...
Returns index of a table or view in the HashMappedList that contains the table objects for this Database. @param table the Table object @return the index of the specified table or view, or -1 if not found
[ "Returns", "index", "of", "a", "table", "or", "view", "in", "the", "HashMappedList", "that", "contains", "the", "table", "objects", "for", "this", "Database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L688-L699
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.recompileDependentObjects
void recompileDependentObjects(Table table) { OrderedHashSet set = getReferencingObjects(table.getName()); Session session = database.sessionManager.getSysSession(); for (int i = 0; i < set.size(); i++) { HsqlName name = (HsqlName) set.get(i); switch (name.t...
java
void recompileDependentObjects(Table table) { OrderedHashSet set = getReferencingObjects(table.getName()); Session session = database.sessionManager.getSysSession(); for (int i = 0; i < set.size(); i++) { HsqlName name = (HsqlName) set.get(i); switch (name.t...
[ "void", "recompileDependentObjects", "(", "Table", "table", ")", "{", "OrderedHashSet", "set", "=", "getReferencingObjects", "(", "table", ".", "getName", "(", ")", ")", ";", "Session", "session", "=", "database", ".", "sessionManager", ".", "getSysSession", "("...
After addition or removal of columns and indexes all views that reference the table should be recompiled.
[ "After", "addition", "or", "removal", "of", "columns", "and", "indexes", "all", "views", "that", "reference", "the", "table", "should", "be", "recompiled", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L733-L760
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.findUserTableForIndex
Table findUserTableForIndex(Session session, String name, String schemaName) { Schema schema = (Schema) schemaMap.get(schemaName); HsqlName indexName = schema.indexLookup.getName(name); if (indexName == null) { return null; } re...
java
Table findUserTableForIndex(Session session, String name, String schemaName) { Schema schema = (Schema) schemaMap.get(schemaName); HsqlName indexName = schema.indexLookup.getName(name); if (indexName == null) { return null; } re...
[ "Table", "findUserTableForIndex", "(", "Session", "session", ",", "String", "name", ",", "String", "schemaName", ")", "{", "Schema", "schema", "=", "(", "Schema", ")", "schemaMap", ".", "get", "(", "schemaName", ")", ";", "HsqlName", "indexName", "=", "schem...
Returns the table that has an index with the given name and schema.
[ "Returns", "the", "table", "that", "has", "an", "index", "with", "the", "given", "name", "and", "schema", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L957-L968
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getSchemaHsqlNameNoThrow
public HsqlName getSchemaHsqlNameNoThrow(String name, HsqlName defaultName) { if (name == null) { return defaultSchemaHsqlName; } if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) { return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME; } Schema schema = ((...
java
public HsqlName getSchemaHsqlNameNoThrow(String name, HsqlName defaultName) { if (name == null) { return defaultSchemaHsqlName; } if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) { return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME; } Schema schema = ((...
[ "public", "HsqlName", "getSchemaHsqlNameNoThrow", "(", "String", "name", ",", "HsqlName", "defaultName", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "defaultSchemaHsqlName", ";", "}", "if", "(", "SqlInvariants", ".", "INFORMATION_SCHEMA", ".",...
If schemaName is null, return the default schema name, else return the HsqlName object for the schema. If schemaName does not exist, return the defaultName provided. Not throwing the usual exception saves some throw-then-catch nonsense in the usual session setup.
[ "If", "schemaName", "is", "null", "return", "the", "default", "schema", "name", "else", "return", "the", "HsqlName", "object", "for", "the", "schema", ".", "If", "schemaName", "does", "not", "exist", "return", "the", "defaultName", "provided", ".", "Not", "t...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L1638-L1654
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/ReplaySequencer.java
ReplaySequencer.dedupe
public InitiateResponseMessage dedupe(long inUniqueId, TransactionInfoBaseMessage in) { if (in instanceof Iv2InitiateTaskMessage) { final Iv2InitiateTaskMessage init = (Iv2InitiateTaskMessage) in; final StoredProcedureInvocation invocation = init.getStoredProcedureInvocation(); ...
java
public InitiateResponseMessage dedupe(long inUniqueId, TransactionInfoBaseMessage in) { if (in instanceof Iv2InitiateTaskMessage) { final Iv2InitiateTaskMessage init = (Iv2InitiateTaskMessage) in; final StoredProcedureInvocation invocation = init.getStoredProcedureInvocation(); ...
[ "public", "InitiateResponseMessage", "dedupe", "(", "long", "inUniqueId", ",", "TransactionInfoBaseMessage", "in", ")", "{", "if", "(", "in", "instanceof", "Iv2InitiateTaskMessage", ")", "{", "final", "Iv2InitiateTaskMessage", "init", "=", "(", "Iv2InitiateTaskMessage",...
Dedupe initiate task messages. Check if the initiate task message is seen before. @param inUniqueId The uniqueId of the message @param in The initiate task message @return A client response to return if it's a duplicate, otherwise null.
[ "Dedupe", "initiate", "task", "messages", ".", "Check", "if", "the", "initiate", "task", "message", "is", "seen", "before", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L171-L194
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/ReplaySequencer.java
ReplaySequencer.updateLastSeenUniqueId
public void updateLastSeenUniqueId(long inUniqueId, TransactionInfoBaseMessage in) { if (in instanceof Iv2InitiateTaskMessage && inUniqueId > m_lastSeenUniqueId) { m_lastSeenUniqueId = inUniqueId; } }
java
public void updateLastSeenUniqueId(long inUniqueId, TransactionInfoBaseMessage in) { if (in instanceof Iv2InitiateTaskMessage && inUniqueId > m_lastSeenUniqueId) { m_lastSeenUniqueId = inUniqueId; } }
[ "public", "void", "updateLastSeenUniqueId", "(", "long", "inUniqueId", ",", "TransactionInfoBaseMessage", "in", ")", "{", "if", "(", "in", "instanceof", "Iv2InitiateTaskMessage", "&&", "inUniqueId", ">", "m_lastSeenUniqueId", ")", "{", "m_lastSeenUniqueId", "=", "inUn...
Update the last seen uniqueId for this partition if it's an initiate task message. @param inUniqueId @param in
[ "Update", "the", "last", "seen", "uniqueId", "for", "this", "partition", "if", "it", "s", "an", "initiate", "task", "message", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L202-L207
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/ReplaySequencer.java
ReplaySequencer.poll
public VoltMessage poll() { if (m_mustDrain || m_replayEntries.isEmpty()) { return null; } if (m_replayEntries.firstEntry().getValue().isEmpty()) { m_replayEntries.pollFirstEntry(); } // All the drain conditions depend on being blocked, which /...
java
public VoltMessage poll() { if (m_mustDrain || m_replayEntries.isEmpty()) { return null; } if (m_replayEntries.firstEntry().getValue().isEmpty()) { m_replayEntries.pollFirstEntry(); } // All the drain conditions depend on being blocked, which /...
[ "public", "VoltMessage", "poll", "(", ")", "{", "if", "(", "m_mustDrain", "||", "m_replayEntries", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "if", "(", "m_replayEntries", ".", "firstEntry", "(", ")", ".", "getValue", "(", ")", "."...
Return the next correctly sequenced message or null if none exists.
[ "Return", "the", "next", "correctly", "sequenced", "message", "or", "null", "if", "none", "exists", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L222-L240
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/ReplaySequencer.java
ReplaySequencer.offer
public boolean offer(long inUniqueId, TransactionInfoBaseMessage in) { ReplayEntry found = m_replayEntries.get(inUniqueId); if (in instanceof Iv2EndOfLogMessage) { m_mpiEOLReached = true; return true; } if (in instanceof MultiPartitionParticipantMessage) { ...
java
public boolean offer(long inUniqueId, TransactionInfoBaseMessage in) { ReplayEntry found = m_replayEntries.get(inUniqueId); if (in instanceof Iv2EndOfLogMessage) { m_mpiEOLReached = true; return true; } if (in instanceof MultiPartitionParticipantMessage) { ...
[ "public", "boolean", "offer", "(", "long", "inUniqueId", ",", "TransactionInfoBaseMessage", "in", ")", "{", "ReplayEntry", "found", "=", "m_replayEntries", ".", "get", "(", "inUniqueId", ")", ";", "if", "(", "in", "instanceof", "Iv2EndOfLogMessage", ")", "{", ...
Offer a new message. Return false if the offered message can be run immediately.
[ "Offer", "a", "new", "message", ".", "Return", "false", "if", "the", "offered", "message", "can", "be", "run", "immediately", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L286-L363
train
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngineIPC.java
ExecutionEngineIPC.verifyDataCapacity
private void verifyDataCapacity(int size) { if (size+4 > m_dataNetwork.capacity()) { m_dataNetworkOrigin.discard(); m_dataNetworkOrigin = org.voltcore.utils.DBBPool.allocateDirect(size+4); m_dataNetwork = m_dataNetworkOrigin.b(); m_dataNetwork.position(4); ...
java
private void verifyDataCapacity(int size) { if (size+4 > m_dataNetwork.capacity()) { m_dataNetworkOrigin.discard(); m_dataNetworkOrigin = org.voltcore.utils.DBBPool.allocateDirect(size+4); m_dataNetwork = m_dataNetworkOrigin.b(); m_dataNetwork.position(4); ...
[ "private", "void", "verifyDataCapacity", "(", "int", "size", ")", "{", "if", "(", "size", "+", "4", ">", "m_dataNetwork", ".", "capacity", "(", ")", ")", "{", "m_dataNetworkOrigin", ".", "discard", "(", ")", ";", "m_dataNetworkOrigin", "=", "org", ".", "...
private int m_counter;
[ "private", "int", "m_counter", ";" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L808-L816
train
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngineIPC.java
ExecutionEngineIPC.initialize
public void initialize( final int clusterIndex, final long siteId, final int partitionId, final int sitesPerHost, final int hostId, final String hostname, final int drClusterId, final int defaultDrBufferSize, fin...
java
public void initialize( final int clusterIndex, final long siteId, final int partitionId, final int sitesPerHost, final int hostId, final String hostname, final int drClusterId, final int defaultDrBufferSize, fin...
[ "public", "void", "initialize", "(", "final", "int", "clusterIndex", ",", "final", "long", "siteId", ",", "final", "int", "partitionId", ",", "final", "int", "sitesPerHost", ",", "final", "int", "hostId", ",", "final", "String", "hostname", ",", "final", "in...
the abstract api assumes construction initializes but here initialization is just another command.
[ "the", "abstract", "api", "assumes", "construction", "initializes", "but", "here", "initialization", "is", "just", "another", "command", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L907-L949
train
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngineIPC.java
ExecutionEngineIPC.coreLoadCatalog
@Override protected void coreLoadCatalog(final long timestamp, final byte[] catalogBytes) throws EEException { int result = ExecutionEngine.ERRORCODE_ERROR; verifyDataCapacity(catalogBytes.length + 100); m_data.clear(); m_data.putInt(Commands.LoadCatalog.m_id); m_data.putLong...
java
@Override protected void coreLoadCatalog(final long timestamp, final byte[] catalogBytes) throws EEException { int result = ExecutionEngine.ERRORCODE_ERROR; verifyDataCapacity(catalogBytes.length + 100); m_data.clear(); m_data.putInt(Commands.LoadCatalog.m_id); m_data.putLong...
[ "@", "Override", "protected", "void", "coreLoadCatalog", "(", "final", "long", "timestamp", ",", "final", "byte", "[", "]", "catalogBytes", ")", "throws", "EEException", "{", "int", "result", "=", "ExecutionEngine", ".", "ERRORCODE_ERROR", ";", "verifyDataCapacity...
write the catalog as a UTF-8 byte string via connection
[ "write", "the", "catalog", "as", "a", "UTF", "-", "8", "byte", "string", "via", "connection" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L952-L971
train
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngineIPC.java
ExecutionEngineIPC.coreUpdateCatalog
@Override public void coreUpdateCatalog(final long timestamp, final boolean isStreamUpdate, final String catalogDiffs) throws EEException { int result = ExecutionEngine.ERRORCODE_ERROR; try { final byte catalogBytes[] = catalogDiffs.getBytes("UTF-8"); verifyDataCapacity(cata...
java
@Override public void coreUpdateCatalog(final long timestamp, final boolean isStreamUpdate, final String catalogDiffs) throws EEException { int result = ExecutionEngine.ERRORCODE_ERROR; try { final byte catalogBytes[] = catalogDiffs.getBytes("UTF-8"); verifyDataCapacity(cata...
[ "@", "Override", "public", "void", "coreUpdateCatalog", "(", "final", "long", "timestamp", ",", "final", "boolean", "isStreamUpdate", ",", "final", "String", "catalogDiffs", ")", "throws", "EEException", "{", "int", "result", "=", "ExecutionEngine", ".", "ERRORCOD...
write the diffs as a UTF-8 byte string via connection
[ "write", "the", "diffs", "as", "a", "UTF", "-", "8", "byte", "string", "via", "connection" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L974-L1001
train
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngineIPC.java
ExecutionEngineIPC.sendDependencyTable
private void sendDependencyTable(final int dependencyId) throws IOException{ final byte[] dependencyBytes = nextDependencyAsBytes(dependencyId); if (dependencyBytes == null) { m_connection.m_socket.getOutputStream().write(Connection.kErrorCode_DependencyNotFound); return; ...
java
private void sendDependencyTable(final int dependencyId) throws IOException{ final byte[] dependencyBytes = nextDependencyAsBytes(dependencyId); if (dependencyBytes == null) { m_connection.m_socket.getOutputStream().write(Connection.kErrorCode_DependencyNotFound); return; ...
[ "private", "void", "sendDependencyTable", "(", "final", "int", "dependencyId", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "dependencyBytes", "=", "nextDependencyAsBytes", "(", "dependencyId", ")", ";", "if", "(", "dependencyBytes", "==", "null",...
Retrieve a dependency table and send it via the connection. If no table is available send a response code indicating such. The message is prepended with two lengths. One length is for the network layer and is the size of the whole message not including the length prefix. @param dependencyId ID of the dependency table t...
[ "Retrieve", "a", "dependency", "table", "and", "send", "it", "via", "the", "connection", ".", "If", "no", "table", "is", "available", "send", "a", "response", "code", "indicating", "such", ".", "The", "message", "is", "prepended", "with", "two", "lengths", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L1426-L1448
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/TransactionTaskQueue.java
TransactionTaskQueue.enableScoreboard
boolean enableScoreboard() { assert (s_barrier != null); try { s_barrier.await(3L, TimeUnit.MINUTES); } catch (InterruptedException | BrokenBarrierException |TimeoutException e) { hostLog.error("Cannot re-enable the scoreboard."); s_barrier.reset(); ...
java
boolean enableScoreboard() { assert (s_barrier != null); try { s_barrier.await(3L, TimeUnit.MINUTES); } catch (InterruptedException | BrokenBarrierException |TimeoutException e) { hostLog.error("Cannot re-enable the scoreboard."); s_barrier.reset(); ...
[ "boolean", "enableScoreboard", "(", ")", "{", "assert", "(", "s_barrier", "!=", "null", ")", ";", "try", "{", "s_barrier", ".", "await", "(", "3L", ",", "TimeUnit", ".", "MINUTES", ")", ";", "}", "catch", "(", "InterruptedException", "|", "BrokenBarrierExc...
After all sites has been fully initialized and ready for snapshot, we should enable the scoreboard.
[ "After", "all", "sites", "has", "been", "fully", "initialized", "and", "ready", "for", "snapshot", "we", "should", "enable", "the", "scoreboard", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L169-L184
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/TransactionTaskQueue.java
TransactionTaskQueue.offer
synchronized void offer(TransactionTask task) { Iv2Trace.logTransactionTaskQueueOffer(task); TransactionState txnState = task.getTransactionState(); if (!m_backlog.isEmpty()) { /* * This branch happens during regular execution when a multi-part is in progress. ...
java
synchronized void offer(TransactionTask task) { Iv2Trace.logTransactionTaskQueueOffer(task); TransactionState txnState = task.getTransactionState(); if (!m_backlog.isEmpty()) { /* * This branch happens during regular execution when a multi-part is in progress. ...
[ "synchronized", "void", "offer", "(", "TransactionTask", "task", ")", "{", "Iv2Trace", ".", "logTransactionTaskQueueOffer", "(", "task", ")", ";", "TransactionState", "txnState", "=", "task", ".", "getTransactionState", "(", ")", ";", "if", "(", "!", "m_backlog"...
If necessary, stick this task in the backlog. Many network threads may be racing to reach here, synchronize to serialize queue order @param task
[ "If", "necessary", "stick", "this", "task", "in", "the", "backlog", ".", "Many", "network", "threads", "may", "be", "racing", "to", "reach", "here", "synchronize", "to", "serialize", "queue", "order" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L210-L267
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/TransactionTaskQueue.java
TransactionTaskQueue.flush
synchronized int flush(long txnId) { if (tmLog.isDebugEnabled()) { tmLog.debug("Flush backlog with txnId:" + TxnEgo.txnIdToString(txnId) + ", backlog head txnId is:" + (m_backlog.isEmpty()? "empty" : TxnEgo.txnIdToString(m_backlog.getFirst().getTxnId())) )...
java
synchronized int flush(long txnId) { if (tmLog.isDebugEnabled()) { tmLog.debug("Flush backlog with txnId:" + TxnEgo.txnIdToString(txnId) + ", backlog head txnId is:" + (m_backlog.isEmpty()? "empty" : TxnEgo.txnIdToString(m_backlog.getFirst().getTxnId())) )...
[ "synchronized", "int", "flush", "(", "long", "txnId", ")", "{", "if", "(", "tmLog", ".", "isDebugEnabled", "(", ")", ")", "{", "tmLog", ".", "debug", "(", "\"Flush backlog with txnId:\"", "+", "TxnEgo", ".", "txnIdToString", "(", "txnId", ")", "+", "\", ba...
Try to offer as many runnable Tasks to the SiteTaskerQueue as possible. @param txnId The transaction ID of the TransactionTask which is completing and causing the flush @return the number of TransactionTasks queued to the SiteTaskerQueue
[ "Try", "to", "offer", "as", "many", "runnable", "Tasks", "to", "the", "SiteTaskerQueue", "as", "possible", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L382-L449
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/TransactionTaskQueue.java
TransactionTaskQueue.getBacklogTasks
public synchronized List<TransactionTask> getBacklogTasks() { List<TransactionTask> pendingTasks = new ArrayList<>(); Iterator<TransactionTask> iter = m_backlog.iterator(); // skip the first fragments which is streaming snapshot TransactionTask mpTask = iter.next(); assert (!mpTa...
java
public synchronized List<TransactionTask> getBacklogTasks() { List<TransactionTask> pendingTasks = new ArrayList<>(); Iterator<TransactionTask> iter = m_backlog.iterator(); // skip the first fragments which is streaming snapshot TransactionTask mpTask = iter.next(); assert (!mpTa...
[ "public", "synchronized", "List", "<", "TransactionTask", ">", "getBacklogTasks", "(", ")", "{", "List", "<", "TransactionTask", ">", "pendingTasks", "=", "new", "ArrayList", "<>", "(", ")", ";", "Iterator", "<", "TransactionTask", ">", "iter", "=", "m_backlog...
Called from streaming snapshot execution
[ "Called", "from", "streaming", "snapshot", "execution" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L505-L521
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/TransactionTaskQueue.java
TransactionTaskQueue.removeMPReadTransactions
public synchronized void removeMPReadTransactions() { TransactionTask task = m_backlog.peekFirst(); while (task != null && task.getTransactionState().isReadOnly()) { task.getTransactionState().setDone(); flush(task.getTxnId()); task = m_backlog.peekFirst(); }...
java
public synchronized void removeMPReadTransactions() { TransactionTask task = m_backlog.peekFirst(); while (task != null && task.getTransactionState().isReadOnly()) { task.getTransactionState().setDone(); flush(task.getTxnId()); task = m_backlog.peekFirst(); }...
[ "public", "synchronized", "void", "removeMPReadTransactions", "(", ")", "{", "TransactionTask", "task", "=", "m_backlog", ".", "peekFirst", "(", ")", ";", "while", "(", "task", "!=", "null", "&&", "task", ".", "getTransactionState", "(", ")", ".", "isReadOnly"...
flush mp readonly transactions out of backlog
[ "flush", "mp", "readonly", "transactions", "out", "of", "backlog" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L524-L531
train
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyValue.java
GeographyValue.getRings
public List<List<GeographyPointValue>> getRings() { /* * Gets the loops that make up the polygon, with the outer loop first. * Note that we need to convert from XYZPoint to GeographyPointValue. * * Include the loop back to the first vertex. Also, since WKT wants * h...
java
public List<List<GeographyPointValue>> getRings() { /* * Gets the loops that make up the polygon, with the outer loop first. * Note that we need to convert from XYZPoint to GeographyPointValue. * * Include the loop back to the first vertex. Also, since WKT wants * h...
[ "public", "List", "<", "List", "<", "GeographyPointValue", ">", ">", "getRings", "(", ")", "{", "/*\n * Gets the loops that make up the polygon, with the outer loop first.\n * Note that we need to convert from XYZPoint to GeographyPointValue.\n *\n * Include t...
Return the list of rings of a polygon. The list has the same values as the list of rings used to construct the polygon, or the sequence of WKT rings used to construct the polygon. @return A list of rings.
[ "Return", "the", "list", "of", "rings", "of", "a", "polygon", ".", "The", "list", "has", "the", "same", "values", "as", "the", "list", "of", "rings", "used", "to", "construct", "the", "polygon", "or", "the", "sequence", "of", "WKT", "rings", "used", "t...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L205-L237
train
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyValue.java
GeographyValue.toWKT
public String toWKT() { StringBuffer sb = new StringBuffer(); sb.append("POLYGON ("); boolean isFirstLoop = true; for (List<XYZPoint> loop : m_loops) { if (!isFirstLoop) { sb.append(", "); } sb.append("("); int startIdx = ...
java
public String toWKT() { StringBuffer sb = new StringBuffer(); sb.append("POLYGON ("); boolean isFirstLoop = true; for (List<XYZPoint> loop : m_loops) { if (!isFirstLoop) { sb.append(", "); } sb.append("("); int startIdx = ...
[ "public", "String", "toWKT", "(", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "sb", ".", "append", "(", "\"POLYGON (\"", ")", ";", "boolean", "isFirstLoop", "=", "true", ";", "for", "(", "List", "<", "XYZPoint", ">", "loo...
Return a representation of this object as well-known text. @return A well-known text string for this object.
[ "Return", "a", "representation", "of", "this", "object", "as", "well", "-", "known", "text", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L252-L281
train
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyValue.java
GeographyValue.getLengthInBytes
public int getLengthInBytes() { long length = polygonOverheadInBytes(); for (List<XYZPoint> loop : m_loops) { length += loopLengthInBytes(loop.size()); } return (int)length; }
java
public int getLengthInBytes() { long length = polygonOverheadInBytes(); for (List<XYZPoint> loop : m_loops) { length += loopLengthInBytes(loop.size()); } return (int)length; }
[ "public", "int", "getLengthInBytes", "(", ")", "{", "long", "length", "=", "polygonOverheadInBytes", "(", ")", ";", "for", "(", "List", "<", "XYZPoint", ">", "loop", ":", "m_loops", ")", "{", "length", "+=", "loopLengthInBytes", "(", "loop", ".", "size", ...
Return the number of bytes in the serialization for this polygon. Returned value does not include the 4-byte length prefix that precedes variable-length types. @return The number of bytes in the serialization for this polygon.
[ "Return", "the", "number", "of", "bytes", "in", "the", "serialization", "for", "this", "polygon", ".", "Returned", "value", "does", "not", "include", "the", "4", "-", "byte", "length", "prefix", "that", "precedes", "variable", "-", "length", "types", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L361-L368
train
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyValue.java
GeographyValue.diagnoseLoop
private static <T> void diagnoseLoop(List<T> loop, String excpMsgPrf) throws IllegalArgumentException { if (loop == null) { throw new IllegalArgumentException(excpMsgPrf + "a polygon must contain at least one ring " + "(with each ring at least 4 points, including repeated closing...
java
private static <T> void diagnoseLoop(List<T> loop, String excpMsgPrf) throws IllegalArgumentException { if (loop == null) { throw new IllegalArgumentException(excpMsgPrf + "a polygon must contain at least one ring " + "(with each ring at least 4 points, including repeated closing...
[ "private", "static", "<", "T", ">", "void", "diagnoseLoop", "(", "List", "<", "T", ">", "loop", ",", "String", "excpMsgPrf", ")", "throws", "IllegalArgumentException", "{", "if", "(", "loop", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException"...
A helper function to validate the loop structure If loop is invalid, it generates IllegalArgumentException exception
[ "A", "helper", "function", "to", "validate", "the", "loop", "structure", "If", "loop", "is", "invalid", "it", "generates", "IllegalArgumentException", "exception" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L636-L657
train
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyValue.java
GeographyValue.add
@Deprecated public GeographyValue add(GeographyPointValue offset) { List<List<GeographyPointValue>> newLoops = new ArrayList<>(); for (List<XYZPoint> oneLoop : m_loops) { List<GeographyPointValue> loop = new ArrayList<>(); for (XYZPoint p : oneLoop) { loop.add...
java
@Deprecated public GeographyValue add(GeographyPointValue offset) { List<List<GeographyPointValue>> newLoops = new ArrayList<>(); for (List<XYZPoint> oneLoop : m_loops) { List<GeographyPointValue> loop = new ArrayList<>(); for (XYZPoint p : oneLoop) { loop.add...
[ "@", "Deprecated", "public", "GeographyValue", "add", "(", "GeographyPointValue", "offset", ")", "{", "List", "<", "List", "<", "GeographyPointValue", ">>", "newLoops", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "List", "<", "XYZPoint", ">", ...
Create a new GeographyValue which is offset from this one by the given point. The latitude and longitude values stay in range because we are using the normalizing operations in GeographyPointValue. @param offset The point by which to translate vertices in this @return The resulting GeographyValue.
[ "Create", "a", "new", "GeographyValue", "which", "is", "offset", "from", "this", "one", "by", "the", "given", "point", ".", "The", "latitude", "and", "longitude", "values", "stay", "in", "range", "because", "we", "are", "using", "the", "normalizing", "operat...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L788-L800
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/scriptio/ScriptWriterBase.java
ScriptWriterBase.sync
public void sync() { if (isClosed) { return; } synchronized (fileStreamOut) { if (needsSync) { if (busyWriting) { forceSync = true; return; } try { fileStreamOu...
java
public void sync() { if (isClosed) { return; } synchronized (fileStreamOut) { if (needsSync) { if (busyWriting) { forceSync = true; return; } try { fileStreamOu...
[ "public", "void", "sync", "(", ")", "{", "if", "(", "isClosed", ")", "{", "return", ";", "}", "synchronized", "(", "fileStreamOut", ")", "{", "if", "(", "needsSync", ")", "{", "if", "(", "busyWriting", ")", "{", "forceSync", "=", "true", ";", "return...
Called internally or externally in write delay intervals.
[ "Called", "internally", "or", "externally", "in", "write", "delay", "intervals", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/scriptio/ScriptWriterBase.java#L180-L208
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/scriptio/ScriptWriterBase.java
ScriptWriterBase.openFile
protected void openFile() { try { FileAccess fa = isDump ? FileUtil.getDefaultInstance() : database.getFileAccess(); OutputStream fos = fa.openOutputStreamElement(outFile); outDescriptor = fa.getFileSync(fos); fileStreamO...
java
protected void openFile() { try { FileAccess fa = isDump ? FileUtil.getDefaultInstance() : database.getFileAccess(); OutputStream fos = fa.openOutputStreamElement(outFile); outDescriptor = fa.getFileSync(fos); fileStreamO...
[ "protected", "void", "openFile", "(", ")", "{", "try", "{", "FileAccess", "fa", "=", "isDump", "?", "FileUtil", ".", "getDefaultInstance", "(", ")", ":", "database", ".", "getFileAccess", "(", ")", ";", "OutputStream", "fos", "=", "fa", ".", "openOutputStr...
File is opened in append mode although in current usage the file never pre-exists
[ "File", "is", "opened", "in", "append", "mode", "although", "in", "current", "usage", "the", "file", "never", "pre", "-", "exists" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/scriptio/ScriptWriterBase.java#L253-L268
train
VoltDB/voltdb
src/frontend/org/voltcore/logging/VoltLogger.java
VoltLogger.createRunnableLoggingTask
private Runnable createRunnableLoggingTask(final Level level, final Object message, final Throwable t) { // While logging, the logger thread temporarily disguises itself as its caller. final String callerThreadName = Thread.currentThread().getName(); final Runnable runnableLoggingTa...
java
private Runnable createRunnableLoggingTask(final Level level, final Object message, final Throwable t) { // While logging, the logger thread temporarily disguises itself as its caller. final String callerThreadName = Thread.currentThread().getName(); final Runnable runnableLoggingTa...
[ "private", "Runnable", "createRunnableLoggingTask", "(", "final", "Level", "level", ",", "final", "Object", "message", ",", "final", "Throwable", "t", ")", "{", "// While logging, the logger thread temporarily disguises itself as its caller.", "final", "String", "callerThread...
Generate a runnable task that logs one message in an exception-safe way. @param level @param message @param t @param callerThreadName @return
[ "Generate", "a", "runnable", "task", "that", "logs", "one", "message", "in", "an", "exception", "-", "safe", "way", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/logging/VoltLogger.java#L193-L214
train
VoltDB/voltdb
src/frontend/org/voltcore/logging/VoltLogger.java
VoltLogger.createRunnableL7dLoggingTask
private Runnable createRunnableL7dLoggingTask(final Level level, final String key, final Object[] params, final Throwable t) { // While logging, the logger thread temporarily disguises itself as its caller. final String callerThreadName = Thread.currentThread().getName(); final Runn...
java
private Runnable createRunnableL7dLoggingTask(final Level level, final String key, final Object[] params, final Throwable t) { // While logging, the logger thread temporarily disguises itself as its caller. final String callerThreadName = Thread.currentThread().getName(); final Runn...
[ "private", "Runnable", "createRunnableL7dLoggingTask", "(", "final", "Level", "level", ",", "final", "String", "key", ",", "final", "Object", "[", "]", "params", ",", "final", "Throwable", "t", ")", "{", "// While logging, the logger thread temporarily disguises itself ...
Generate a runnable task that logs one localized message in an exception-safe way. @param level @param message @param t @param callerThreadName @return
[ "Generate", "a", "runnable", "task", "that", "logs", "one", "localized", "message", "in", "an", "exception", "-", "safe", "way", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/logging/VoltLogger.java#L255-L276
train
VoltDB/voltdb
src/frontend/org/voltcore/logging/VoltLogger.java
VoltLogger.configure
public static void configure(String xmlConfig, File voltroot) { try { Class<?> loggerClz = Class.forName("org.voltcore.logging.VoltLog4jLogger"); assert(loggerClz != null); Method configureMethod = loggerClz.getMethod("configure", String.class, File.class); config...
java
public static void configure(String xmlConfig, File voltroot) { try { Class<?> loggerClz = Class.forName("org.voltcore.logging.VoltLog4jLogger"); assert(loggerClz != null); Method configureMethod = loggerClz.getMethod("configure", String.class, File.class); config...
[ "public", "static", "void", "configure", "(", "String", "xmlConfig", ",", "File", "voltroot", ")", "{", "try", "{", "Class", "<", "?", ">", "loggerClz", "=", "Class", ".", "forName", "(", "\"org.voltcore.logging.VoltLog4jLogger\"", ")", ";", "assert", "(", "...
Static method to change the Log4j config globally. This fails if you're not using Log4j for now. @param xmlConfig The text of a Log4j config file. @param voltroot The VoltDB root path
[ "Static", "method", "to", "change", "the", "Log4j", "config", "globally", ".", "This", "fails", "if", "you", "re", "not", "using", "Log4j", "for", "now", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/logging/VoltLogger.java#L360-L367
train
VoltDB/voltdb
src/catgen/in/javasrc/CatalogMap.java
CatalogMap.get
public T get(String name) { if (m_items == null) { return null; } return m_items.get(name.toUpperCase()); }
java
public T get(String name) { if (m_items == null) { return null; } return m_items.get(name.toUpperCase()); }
[ "public", "T", "get", "(", "String", "name", ")", "{", "if", "(", "m_items", "==", "null", ")", "{", "return", "null", ";", "}", "return", "m_items", ".", "get", "(", "name", ".", "toUpperCase", "(", ")", ")", ";", "}" ]
Get an item from the map by name @param name The name of the requested CatalogType instance in the map @return The item found in the map, or null if not found
[ "Get", "an", "item", "from", "the", "map", "by", "name" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogMap.java#L76-L81
train
VoltDB/voltdb
src/catgen/in/javasrc/CatalogMap.java
CatalogMap.iterator
@Override public Iterator<T> iterator() { if (m_items == null) { m_items = new TreeMap<String, T>(); } return m_items.values().iterator(); }
java
@Override public Iterator<T> iterator() { if (m_items == null) { m_items = new TreeMap<String, T>(); } return m_items.values().iterator(); }
[ "@", "Override", "public", "Iterator", "<", "T", ">", "iterator", "(", ")", "{", "if", "(", "m_items", "==", "null", ")", "{", "m_items", "=", "new", "TreeMap", "<", "String", ",", "T", ">", "(", ")", ";", "}", "return", "m_items", ".", "values", ...
Get an iterator for the items in the map @return The iterator for the items in the map
[ "Get", "an", "iterator", "for", "the", "items", "in", "the", "map" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogMap.java#L133-L139
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/QueryPlanner.java
QueryPlanner.validateMigrateStmt
private static void validateMigrateStmt(String sql, VoltXMLElement xmlSQL, Database db) { final Map<String, String> attributes = xmlSQL.attributes; assert attributes.size() == 1; final Table targetTable = db.getTables().get(attributes.get("table")); assert targetTable != null; fi...
java
private static void validateMigrateStmt(String sql, VoltXMLElement xmlSQL, Database db) { final Map<String, String> attributes = xmlSQL.attributes; assert attributes.size() == 1; final Table targetTable = db.getTables().get(attributes.get("table")); assert targetTable != null; fi...
[ "private", "static", "void", "validateMigrateStmt", "(", "String", "sql", ",", "VoltXMLElement", "xmlSQL", ",", "Database", "db", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "attributes", "=", "xmlSQL", ".", "attributes", ";", "assert", "att...
Check that "MIGRATE FROM tbl WHERE..." statement is valid. @param sql SQL statement @param xmlSQL HSQL parsed tree @param db database catalog
[ "Check", "that", "MIGRATE", "FROM", "tbl", "WHERE", "...", "statement", "is", "valid", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/QueryPlanner.java#L203-L228
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/QueryPlanner.java
QueryPlanner.parameterize
public String parameterize() { Set<Integer> paramIds = new HashSet<>(); ParameterizationInfo.findUserParametersRecursively(m_xmlSQL, paramIds); m_adhocUserParamsCount = paramIds.size(); m_paramzInfo = null; if (paramIds.size() == 0) { m_paramzInfo = ParameterizationI...
java
public String parameterize() { Set<Integer> paramIds = new HashSet<>(); ParameterizationInfo.findUserParametersRecursively(m_xmlSQL, paramIds); m_adhocUserParamsCount = paramIds.size(); m_paramzInfo = null; if (paramIds.size() == 0) { m_paramzInfo = ParameterizationI...
[ "public", "String", "parameterize", "(", ")", "{", "Set", "<", "Integer", ">", "paramIds", "=", "new", "HashSet", "<>", "(", ")", ";", "ParameterizationInfo", ".", "findUserParametersRecursively", "(", "m_xmlSQL", ",", "paramIds", ")", ";", "m_adhocUserParamsCou...
Auto-parameterize all of the literals in the parsed SQL statement. @return An opaque token representing the parsed statement with (possibly) parameterization.
[ "Auto", "-", "parameterize", "all", "of", "the", "literals", "in", "the", "parsed", "SQL", "statement", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/QueryPlanner.java#L265-L285
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/QueryPlanner.java
QueryPlanner.plan
public CompiledPlan plan() throws PlanningErrorException { // reset any error message m_recentErrorMsg = null; // what's going to happen next: // If a parameterized statement exists, try to make a plan with it // On success return the plan. // On failure, try the plan...
java
public CompiledPlan plan() throws PlanningErrorException { // reset any error message m_recentErrorMsg = null; // what's going to happen next: // If a parameterized statement exists, try to make a plan with it // On success return the plan. // On failure, try the plan...
[ "public", "CompiledPlan", "plan", "(", ")", "throws", "PlanningErrorException", "{", "// reset any error message", "m_recentErrorMsg", "=", "null", ";", "// what's going to happen next:", "// If a parameterized statement exists, try to make a plan with it", "// On success return the ...
Get the best plan for the SQL statement given, assuming the given costModel. @return The best plan found for the SQL statement. @throws PlanningErrorException on failure.
[ "Get", "the", "best", "plan", "for", "the", "SQL", "statement", "given", "assuming", "the", "given", "costModel", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/QueryPlanner.java#L307-L353
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/QueryPlanner.java
QueryPlanner.harmonizeCommonTableSchemas
private void harmonizeCommonTableSchemas(CompiledPlan plan) { List<AbstractPlanNode> seqScanNodes = plan.rootPlanGraph.findAllNodesOfClass(SeqScanPlanNode.class); for (AbstractPlanNode planNode : seqScanNodes) { SeqScanPlanNode seqScanNode = (SeqScanPlanNode)planNode; StmtCommonT...
java
private void harmonizeCommonTableSchemas(CompiledPlan plan) { List<AbstractPlanNode> seqScanNodes = plan.rootPlanGraph.findAllNodesOfClass(SeqScanPlanNode.class); for (AbstractPlanNode planNode : seqScanNodes) { SeqScanPlanNode seqScanNode = (SeqScanPlanNode)planNode; StmtCommonT...
[ "private", "void", "harmonizeCommonTableSchemas", "(", "CompiledPlan", "plan", ")", "{", "List", "<", "AbstractPlanNode", ">", "seqScanNodes", "=", "plan", ".", "rootPlanGraph", ".", "findAllNodesOfClass", "(", "SeqScanPlanNode", ".", "class", ")", ";", "for", "("...
Make sure that schemas in base and recursive plans in common table scans have identical schemas. This is important because otherwise we will get data corruption in the EE. We look for SeqScanPlanNodes, then look for a common table scan, and ask the scan node to harmonize its schemas. @param plan
[ "Make", "sure", "that", "schemas", "in", "base", "and", "recursive", "plans", "in", "common", "table", "scans", "have", "identical", "schemas", ".", "This", "is", "important", "because", "otherwise", "we", "will", "get", "data", "corruption", "in", "the", "E...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/QueryPlanner.java#L555-L564
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/ValuePoolHashMap.java
ValuePoolHashMap.resetCapacity
public void resetCapacity(int newCapacity, int newPolicy) throws IllegalArgumentException { if (newCapacity != 0 && hashIndex.elementCount > newCapacity) { int surplus = hashIndex.elementCount - newCapacity; surplus += (surplus >> 5); if (surp...
java
public void resetCapacity(int newCapacity, int newPolicy) throws IllegalArgumentException { if (newCapacity != 0 && hashIndex.elementCount > newCapacity) { int surplus = hashIndex.elementCount - newCapacity; surplus += (surplus >> 5); if (surp...
[ "public", "void", "resetCapacity", "(", "int", "newCapacity", ",", "int", "newPolicy", ")", "throws", "IllegalArgumentException", "{", "if", "(", "newCapacity", "!=", "0", "&&", "hashIndex", ".", "elementCount", ">", "newCapacity", ")", "{", "int", "surplus", ...
In rare circumstances resetCapacity may not succeed, in which case capacity remains unchanged but purge policy is set to newPolicy
[ "In", "rare", "circumstances", "resetCapacity", "may", "not", "succeed", "in", "which", "case", "capacity", "remains", "unchanged", "but", "purge", "policy", "is", "set", "to", "newPolicy" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/ValuePoolHashMap.java#L74-L99
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCacheSession.java
DataFileCacheSession.initParams
protected void initParams(Database database, String baseFileName) { fileName = baseFileName + ".data.tmp"; this.database = database; fa = FileUtil.getDefaultInstance(); int cacheSizeScale = 10; cacheFileScale = 8; Error.printSystemOut("cache_size_scale...
java
protected void initParams(Database database, String baseFileName) { fileName = baseFileName + ".data.tmp"; this.database = database; fa = FileUtil.getDefaultInstance(); int cacheSizeScale = 10; cacheFileScale = 8; Error.printSystemOut("cache_size_scale...
[ "protected", "void", "initParams", "(", "Database", "database", ",", "String", "baseFileName", ")", "{", "fileName", "=", "baseFileName", "+", "\".data.tmp\"", ";", "this", ".", "database", "=", "database", ";", "fa", "=", "FileUtil", ".", "getDefaultInstance", ...
Initial external parameters are set here. The size if fixed.
[ "Initial", "external", "parameters", "are", "set", "here", ".", "The", "size", "if", "fixed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCacheSession.java#L57-L76
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCacheSession.java
DataFileCacheSession.close
public synchronized void close(boolean write) { try { if (dataFile != null) { dataFile.close(); dataFile = null; fa.removeElement(fileName); } } catch (Throwable e) { database.logger.appLog.logContext(e, null); ...
java
public synchronized void close(boolean write) { try { if (dataFile != null) { dataFile.close(); dataFile = null; fa.removeElement(fileName); } } catch (Throwable e) { database.logger.appLog.logContext(e, null); ...
[ "public", "synchronized", "void", "close", "(", "boolean", "write", ")", "{", "try", "{", "if", "(", "dataFile", "!=", "null", ")", "{", "dataFile", ".", "close", "(", ")", ";", "dataFile", "=", "null", ";", "fa", ".", "removeElement", "(", "fileName",...
Parameter write is always false. The backing file is simply closed and deleted.
[ "Parameter", "write", "is", "always", "false", ".", "The", "backing", "file", "is", "simply", "closed", "and", "deleted", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCacheSession.java#L110-L128
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/microoptimizations/MakeInsertNodesInlineIfPossible.java
MakeInsertNodesInlineIfPossible.recursivelyApply
private AbstractPlanNode recursivelyApply(AbstractPlanNode plan, int childIdx) { // If this is an insert plan node, then try to // inline it. There will only ever by one insert // node, so if we can't inline it we just return the // given plan. if (plan instanceof InsertPlanNode...
java
private AbstractPlanNode recursivelyApply(AbstractPlanNode plan, int childIdx) { // If this is an insert plan node, then try to // inline it. There will only ever by one insert // node, so if we can't inline it we just return the // given plan. if (plan instanceof InsertPlanNode...
[ "private", "AbstractPlanNode", "recursivelyApply", "(", "AbstractPlanNode", "plan", ",", "int", "childIdx", ")", "{", "// If this is an insert plan node, then try to", "// inline it. There will only ever by one insert", "// node, so if we can't inline it we just return the", "// given p...
This helper function is called when we recurse down the childIdx-th child of a parent node. @param plan @param parentIdx @return
[ "This", "helper", "function", "is", "called", "when", "we", "recurse", "down", "the", "childIdx", "-", "th", "child", "of", "a", "parent", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/microoptimizations/MakeInsertNodesInlineIfPossible.java#L38-L83
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.updateTableNames
static void updateTableNames(List<ParsedColInfo> src, String tblName) { src.forEach(ci -> ci.updateTableName(tblName, tblName).toTVE(ci.m_index, ci.m_index)); }
java
static void updateTableNames(List<ParsedColInfo> src, String tblName) { src.forEach(ci -> ci.updateTableName(tblName, tblName).toTVE(ci.m_index, ci.m_index)); }
[ "static", "void", "updateTableNames", "(", "List", "<", "ParsedColInfo", ">", "src", ",", "String", "tblName", ")", "{", "src", ".", "forEach", "(", "ci", "->", "ci", ".", "updateTableName", "(", "tblName", ",", "tblName", ")", ".", "toTVE", "(", "ci", ...
table names.
[ "table", "names", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L170-L172
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.rewriteAsMV
ParsedSelectStmt rewriteAsMV(Table view) { m_groupByColumns.clear(); m_distinctGroupByColumns = null; m_groupByExpressions.clear(); m_distinctProjectSchema = null; m_distinct = m_hasAggregateExpression = m_hasComplexGroupby = m_hasComplexAgg = false; // Resets paramsBy* f...
java
ParsedSelectStmt rewriteAsMV(Table view) { m_groupByColumns.clear(); m_distinctGroupByColumns = null; m_groupByExpressions.clear(); m_distinctProjectSchema = null; m_distinct = m_hasAggregateExpression = m_hasComplexGroupby = m_hasComplexAgg = false; // Resets paramsBy* f...
[ "ParsedSelectStmt", "rewriteAsMV", "(", "Table", "view", ")", "{", "m_groupByColumns", ".", "clear", "(", ")", ";", "m_distinctGroupByColumns", "=", "null", ";", "m_groupByExpressions", ".", "clear", "(", ")", ";", "m_distinctProjectSchema", "=", "null", ";", "m...
Updates miscellaneous fields as part of rewriting as materialized view.
[ "Updates", "miscellaneous", "fields", "as", "part", "of", "rewriting", "as", "materialized", "view", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L186-L208
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.generateStmtTableScan
public StmtTargetTableScan generateStmtTableScan(Table view) { StmtTargetTableScan st = new StmtTargetTableScan(view); m_displayColumns.forEach(ci -> st.resolveTVE((TupleValueExpression)(ci.m_expression))); defineTableScanByAlias(view.getTypeName(), st); return st; }
java
public StmtTargetTableScan generateStmtTableScan(Table view) { StmtTargetTableScan st = new StmtTargetTableScan(view); m_displayColumns.forEach(ci -> st.resolveTVE((TupleValueExpression)(ci.m_expression))); defineTableScanByAlias(view.getTypeName(), st); return st; }
[ "public", "StmtTargetTableScan", "generateStmtTableScan", "(", "Table", "view", ")", "{", "StmtTargetTableScan", "st", "=", "new", "StmtTargetTableScan", "(", "view", ")", ";", "m_displayColumns", ".", "forEach", "(", "ci", "->", "st", ".", "resolveTVE", "(", "(...
Generate table scan, and add the scan to m_tableAliasMap
[ "Generate", "table", "scan", "and", "add", "the", "scan", "to", "m_tableAliasMap" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L211-L216
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.switchOptimalSuiteForAvgPushdown
public void switchOptimalSuiteForAvgPushdown () { m_displayColumns = m_avgPushdownDisplayColumns; m_aggResultColumns = m_avgPushdownAggResultColumns; m_groupByColumns = m_avgPushdownGroupByColumns; m_distinctGroupByColumns = m_avgPushdownDistinctGroupByColumns; m_orderColumns = m...
java
public void switchOptimalSuiteForAvgPushdown () { m_displayColumns = m_avgPushdownDisplayColumns; m_aggResultColumns = m_avgPushdownAggResultColumns; m_groupByColumns = m_avgPushdownGroupByColumns; m_distinctGroupByColumns = m_avgPushdownDistinctGroupByColumns; m_orderColumns = m...
[ "public", "void", "switchOptimalSuiteForAvgPushdown", "(", ")", "{", "m_displayColumns", "=", "m_avgPushdownDisplayColumns", ";", "m_aggResultColumns", "=", "m_avgPushdownAggResultColumns", ";", "m_groupByColumns", "=", "m_avgPushdownGroupByColumns", ";", "m_distinctGroupByColumn...
Switch the optimal set for pushing down AVG
[ "Switch", "the", "optimal", "set", "for", "pushing", "down", "AVG" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L397-L407
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.prepareMVBasedQueryFix
private void prepareMVBasedQueryFix() { // ENG-5386: Edge cases query returning correct answers with // aggregation push down does not need reAggregation work. if (m_hasComplexGroupby) { m_mvFixInfo.setEdgeCaseQueryNoFixNeeded(false); } // Handle joined query case c...
java
private void prepareMVBasedQueryFix() { // ENG-5386: Edge cases query returning correct answers with // aggregation push down does not need reAggregation work. if (m_hasComplexGroupby) { m_mvFixInfo.setEdgeCaseQueryNoFixNeeded(false); } // Handle joined query case c...
[ "private", "void", "prepareMVBasedQueryFix", "(", ")", "{", "// ENG-5386: Edge cases query returning correct answers with", "// aggregation push down does not need reAggregation work.", "if", "(", "m_hasComplexGroupby", ")", "{", "m_mvFixInfo", ".", "setEdgeCaseQueryNoFixNeeded", "("...
Prepare for the mv based distributed query fix only if it might be required.
[ "Prepare", "for", "the", "mv", "based", "distributed", "query", "fix", "only", "if", "it", "might", "be", "required", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L412-L442
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.placeTVEsinColumns
private void placeTVEsinColumns () { // Build the association between the table column with its index Map<AbstractExpression, Integer> aggTableIndexMap = new HashMap<>(); Map<Integer, ParsedColInfo> indexToColumnMap = new HashMap<>(); int index = 0; for (ParsedColInfo col : m_agg...
java
private void placeTVEsinColumns () { // Build the association between the table column with its index Map<AbstractExpression, Integer> aggTableIndexMap = new HashMap<>(); Map<Integer, ParsedColInfo> indexToColumnMap = new HashMap<>(); int index = 0; for (ParsedColInfo col : m_agg...
[ "private", "void", "placeTVEsinColumns", "(", ")", "{", "// Build the association between the table column with its index", "Map", "<", "AbstractExpression", ",", "Integer", ">", "aggTableIndexMap", "=", "new", "HashMap", "<>", "(", ")", ";", "Map", "<", "Integer", ",...
Generate new output Schema and Place TVEs for display columns if needed. Place TVEs for order by columns always.
[ "Generate", "new", "output", "Schema", "and", "Place", "TVEs", "for", "display", "columns", "if", "needed", ".", "Place", "TVEs", "for", "order", "by", "columns", "always", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L535-L583
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.insertAggExpressionsToAggResultColumns
private void insertAggExpressionsToAggResultColumns ( List<AbstractExpression> aggColumns, ParsedColInfo cookedCol) { for (AbstractExpression expr: aggColumns) { assert(expr instanceof AggregateExpression); if (expr.hasSubquerySubexpression()) { throw new Plan...
java
private void insertAggExpressionsToAggResultColumns ( List<AbstractExpression> aggColumns, ParsedColInfo cookedCol) { for (AbstractExpression expr: aggColumns) { assert(expr instanceof AggregateExpression); if (expr.hasSubquerySubexpression()) { throw new Plan...
[ "private", "void", "insertAggExpressionsToAggResultColumns", "(", "List", "<", "AbstractExpression", ">", "aggColumns", ",", "ParsedColInfo", "cookedCol", ")", "{", "for", "(", "AbstractExpression", "expr", ":", "aggColumns", ")", "{", "assert", "(", "expr", "instan...
ParseDisplayColumns and ParseOrderColumns will call this function to add Aggregation expressions to aggResultColumns @param aggColumns @param cookedCol
[ "ParseDisplayColumns", "and", "ParseOrderColumns", "will", "call", "this", "function", "to", "add", "Aggregation", "expressions", "to", "aggResultColumns" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L643-L680
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.insertToColumnList
private static void insertToColumnList( List<ParsedColInfo> columnList, List<ParsedColInfo> newCols) { for (ParsedColInfo col : newCols) { if (!columnList.contains(col)) { columnList.add(col); } } }
java
private static void insertToColumnList( List<ParsedColInfo> columnList, List<ParsedColInfo> newCols) { for (ParsedColInfo col : newCols) { if (!columnList.contains(col)) { columnList.add(col); } } }
[ "private", "static", "void", "insertToColumnList", "(", "List", "<", "ParsedColInfo", ">", "columnList", ",", "List", "<", "ParsedColInfo", ">", "newCols", ")", "{", "for", "(", "ParsedColInfo", "col", ":", "newCols", ")", "{", "if", "(", "!", "columnList", ...
Concat elements to the XXXColumns list
[ "Concat", "elements", "to", "the", "XXXColumns", "list" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L699-L706
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.findAllTVEs
private void findAllTVEs( AbstractExpression expr, List<TupleValueExpression> tveList) { if (!isNewtoColumnList(m_aggResultColumns, expr)) { return; } if (expr instanceof TupleValueExpression) { tveList.add((TupleValueExpression) expr.clone()); re...
java
private void findAllTVEs( AbstractExpression expr, List<TupleValueExpression> tveList) { if (!isNewtoColumnList(m_aggResultColumns, expr)) { return; } if (expr instanceof TupleValueExpression) { tveList.add((TupleValueExpression) expr.clone()); re...
[ "private", "void", "findAllTVEs", "(", "AbstractExpression", "expr", ",", "List", "<", "TupleValueExpression", ">", "tveList", ")", "{", "if", "(", "!", "isNewtoColumnList", "(", "m_aggResultColumns", ",", "expr", ")", ")", "{", "return", ";", "}", "if", "("...
Find all TVEs except inside of AggregationExpression @param expr @param tveList
[ "Find", "all", "TVEs", "except", "inside", "of", "AggregationExpression" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L723-L747
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.verifyWindowFunctionExpressions
private void verifyWindowFunctionExpressions() { // Check for windowed expressions. if (m_windowFunctionExpressions.size() > 0) { if (m_windowFunctionExpressions.size() > 1) { throw new PlanningErrorException( "Only one windowed function call may appea...
java
private void verifyWindowFunctionExpressions() { // Check for windowed expressions. if (m_windowFunctionExpressions.size() > 0) { if (m_windowFunctionExpressions.size() > 1) { throw new PlanningErrorException( "Only one windowed function call may appea...
[ "private", "void", "verifyWindowFunctionExpressions", "(", ")", "{", "// Check for windowed expressions.", "if", "(", "m_windowFunctionExpressions", ".", "size", "(", ")", ">", "0", ")", "{", "if", "(", "m_windowFunctionExpressions", ".", "size", "(", ")", ">", "1...
Verify the validity of the windowed expressions. @return
[ "Verify", "the", "validity", "of", "the", "windowed", "expressions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L978-L1052
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.canPushdownLimit
private boolean canPushdownLimit() { boolean limitCanPushdown = (m_limitOffset.hasLimit() && !m_distinct); if (limitCanPushdown) { for (ParsedColInfo col : m_displayColumns) { AbstractExpression rootExpr = col.m_expression; if (rootExpr instanceof AggregateExp...
java
private boolean canPushdownLimit() { boolean limitCanPushdown = (m_limitOffset.hasLimit() && !m_distinct); if (limitCanPushdown) { for (ParsedColInfo col : m_displayColumns) { AbstractExpression rootExpr = col.m_expression; if (rootExpr instanceof AggregateExp...
[ "private", "boolean", "canPushdownLimit", "(", ")", "{", "boolean", "limitCanPushdown", "=", "(", "m_limitOffset", ".", "hasLimit", "(", ")", "&&", "!", "m_distinct", ")", ";", "if", "(", "limitCanPushdown", ")", "{", "for", "(", "ParsedColInfo", "col", ":",...
Check if the LimitPlanNode can be pushed down. The LimitPlanNode may have a LIMIT clause only, OFFSET clause only, or both. Offset only cannot be pushed down. @return
[ "Check", "if", "the", "LimitPlanNode", "can", "be", "pushed", "down", ".", "The", "LimitPlanNode", "may", "have", "a", "LIMIT", "clause", "only", "OFFSET", "clause", "only", "or", "both", ".", "Offset", "only", "cannot", "be", "pushed", "down", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L1306-L1320
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.isValidJoinOrder
private boolean isValidJoinOrder(List<String> tableAliases) { assert(m_joinTree != null); // Split the original tree into the sub-trees // having the same join type for all nodes List<JoinNode> subTrees = m_joinTree.extractSubTrees(); // For a sub-tree with inner joins only, an...
java
private boolean isValidJoinOrder(List<String> tableAliases) { assert(m_joinTree != null); // Split the original tree into the sub-trees // having the same join type for all nodes List<JoinNode> subTrees = m_joinTree.extractSubTrees(); // For a sub-tree with inner joins only, an...
[ "private", "boolean", "isValidJoinOrder", "(", "List", "<", "String", ">", "tableAliases", ")", "{", "assert", "(", "m_joinTree", "!=", "null", ")", ";", "// Split the original tree into the sub-trees", "// having the same join type for all nodes", "List", "<", "JoinNode"...
Validate the specified join order against the join tree. In general, outer joins are not associative and commutative. Not all orders are valid. In case of a valid join order, the initial join tree is rebuilt to match the specified order @param tables list of table aliases(or tables) to join @return true if the join ord...
[ "Validate", "the", "specified", "join", "order", "against", "the", "join", "tree", ".", "In", "general", "outer", "joins", "are", "not", "associative", "and", "commutative", ".", "Not", "all", "orders", "are", "valid", ".", "In", "case", "of", "a", "valid"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L1712-L1801
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.isOrderDeterministic
@Override public boolean isOrderDeterministic() { if ( ! hasTopLevelScans()) { // This currently applies to parent queries that do all their // scanning in subqueries and so take on the order determinism of // their subqueries. This might have to be rethought to allow ...
java
@Override public boolean isOrderDeterministic() { if ( ! hasTopLevelScans()) { // This currently applies to parent queries that do all their // scanning in subqueries and so take on the order determinism of // their subqueries. This might have to be rethought to allow ...
[ "@", "Override", "public", "boolean", "isOrderDeterministic", "(", ")", "{", "if", "(", "!", "hasTopLevelScans", "(", ")", ")", "{", "// This currently applies to parent queries that do all their", "// scanning in subqueries and so take on the order determinism of", "// their sub...
Returns true if this select statement can be proved to always produce its result rows in the same order every time that it is executed.
[ "Returns", "true", "if", "this", "select", "statement", "can", "be", "proved", "to", "always", "produce", "its", "result", "rows", "in", "the", "same", "order", "every", "time", "that", "it", "is", "executed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L2001-L2057
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.orderByColumnsDetermineAllDisplayColumnsForUnion
public boolean orderByColumnsDetermineAllDisplayColumnsForUnion( List<ParsedColInfo> orderColumns) { Set<AbstractExpression> orderExprs = new HashSet<>(); for (ParsedColInfo col : orderColumns) { orderExprs.add(col.m_expression); } for (ParsedColInfo col : m_disp...
java
public boolean orderByColumnsDetermineAllDisplayColumnsForUnion( List<ParsedColInfo> orderColumns) { Set<AbstractExpression> orderExprs = new HashSet<>(); for (ParsedColInfo col : orderColumns) { orderExprs.add(col.m_expression); } for (ParsedColInfo col : m_disp...
[ "public", "boolean", "orderByColumnsDetermineAllDisplayColumnsForUnion", "(", "List", "<", "ParsedColInfo", ">", "orderColumns", ")", "{", "Set", "<", "AbstractExpression", ">", "orderExprs", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "ParsedColInfo", ...
This is a very simple version of the above method for when an ORDER BY clause appears on a UNION. Does the ORDER BY clause reference every item on the display list? If so, then the order is deterministic. Note that in this method we don't do more sophisticated analysis (like using value equivalence, or knowledge of ...
[ "This", "is", "a", "very", "simple", "version", "of", "the", "above", "method", "for", "when", "an", "ORDER", "BY", "clause", "appears", "on", "a", "UNION", ".", "Does", "the", "ORDER", "BY", "clause", "reference", "every", "item", "on", "the", "display"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L2262-L2276
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedSelectStmt.java
ParsedSelectStmt.isPartitionColumnInWindowedAggregatePartitionByList
public boolean isPartitionColumnInWindowedAggregatePartitionByList() { if (getWindowFunctionExpressions().size() == 0) { return false; } // We can't really have more than one Windowed Aggregate Expression. // If we ever do, this should fail gracelessly. assert(getWind...
java
public boolean isPartitionColumnInWindowedAggregatePartitionByList() { if (getWindowFunctionExpressions().size() == 0) { return false; } // We can't really have more than one Windowed Aggregate Expression. // If we ever do, this should fail gracelessly. assert(getWind...
[ "public", "boolean", "isPartitionColumnInWindowedAggregatePartitionByList", "(", ")", "{", "if", "(", "getWindowFunctionExpressions", "(", ")", ".", "size", "(", ")", "==", "0", ")", "{", "return", "false", ";", "}", "// We can't really have more than one Windowed Aggre...
Return true iff all the windowed partition expressions have a table partition column in their partition by list, and if there is one such windowed partition expression. If there are no windowed expressions, we return false. Note that there can only be one windowed expression currently, so this is more general than it n...
[ "Return", "true", "iff", "all", "the", "windowed", "partition", "expressions", "have", "a", "table", "partition", "column", "in", "their", "partition", "by", "list", "and", "if", "there", "is", "one", "such", "windowed", "partition", "expression", ".", "If", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedSelectStmt.java#L2540-L2579
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/PolygonFactory.java
PolygonFactory.CreateRegularConvex
@Deprecated public static GeographyValue CreateRegularConvex( GeographyPointValue center, GeographyPointValue firstVertex, int numVertices, double sizeOfHole) { assert(0 <= sizeOfHole && sizeOfHole < 1.0); double phi = 360.0/numVertices; Geogra...
java
@Deprecated public static GeographyValue CreateRegularConvex( GeographyPointValue center, GeographyPointValue firstVertex, int numVertices, double sizeOfHole) { assert(0 <= sizeOfHole && sizeOfHole < 1.0); double phi = 360.0/numVertices; Geogra...
[ "@", "Deprecated", "public", "static", "GeographyValue", "CreateRegularConvex", "(", "GeographyPointValue", "center", ",", "GeographyPointValue", "firstVertex", ",", "int", "numVertices", ",", "double", "sizeOfHole", ")", "{", "assert", "(", "0", "<=", "sizeOfHole", ...
Create a regular convex polygon, with an optional hole. Note that the resulting polygon will be symmetric around any line through the center and a vertex. Consequently, the centroid of such a polygon must be the center of the polygon. @param center The center of the polygon. @param firstVertex The coordinates of the...
[ "Create", "a", "regular", "convex", "polygon", "with", "an", "optional", "hole", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PolygonFactory.java#L44-L80
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/PolygonFactory.java
PolygonFactory.reverseLoops
@Deprecated public static GeographyValue reverseLoops(GeographyValue goodPolygon) { List<List<GeographyPointValue>> newLoops = new ArrayList<>(); List<List<GeographyPointValue>> oldLoops = goodPolygon.getRings(); for (List<GeographyPointValue> loop : oldLoops) { // Copy loop, but...
java
@Deprecated public static GeographyValue reverseLoops(GeographyValue goodPolygon) { List<List<GeographyPointValue>> newLoops = new ArrayList<>(); List<List<GeographyPointValue>> oldLoops = goodPolygon.getRings(); for (List<GeographyPointValue> loop : oldLoops) { // Copy loop, but...
[ "@", "Deprecated", "public", "static", "GeographyValue", "reverseLoops", "(", "GeographyValue", "goodPolygon", ")", "{", "List", "<", "List", "<", "GeographyPointValue", ">>", "newLoops", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "List", "<", ...
Reverse all the loops in a polygon. Don't change the order of the loops, just reverse each loop. This is useful for testing a malformed polygon. @param goodPolygon @return
[ "Reverse", "all", "the", "loops", "in", "a", "polygon", ".", "Don", "t", "change", "the", "order", "of", "the", "loops", "just", "reverse", "each", "loop", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PolygonFactory.java#L195-L211
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java
GranteeManager.grant
public void grant(String granteeName, String roleName, Grantee grantor) { Grantee grantee = get(granteeName); if (grantee == null) { throw Error.error(ErrorCode.X_28501, granteeName); } if (isImmutable(granteeName)) { throw Error.error(ErrorCode.X_28502, grante...
java
public void grant(String granteeName, String roleName, Grantee grantor) { Grantee grantee = get(granteeName); if (grantee == null) { throw Error.error(ErrorCode.X_28501, granteeName); } if (isImmutable(granteeName)) { throw Error.error(ErrorCode.X_28502, grante...
[ "public", "void", "grant", "(", "String", "granteeName", ",", "String", "roleName", ",", "Grantee", "grantor", ")", "{", "Grantee", "grantee", "=", "get", "(", "granteeName", ")", ";", "if", "(", "grantee", "==", "null", ")", "{", "throw", "Error", ".", ...
Grant a role to this Grantee.
[ "Grant", "a", "role", "to", "this", "Grantee", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java#L250-L293
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java
GranteeManager.revoke
public void revoke(String granteeName, String roleName, Grantee grantor) { if (!grantor.isAdmin()) { throw Error.error(ErrorCode.X_42507); } Grantee grantee = get(granteeName); if (grantee == null) { throw Error.error(ErrorCode.X_28000, granteeName); } ...
java
public void revoke(String granteeName, String roleName, Grantee grantor) { if (!grantor.isAdmin()) { throw Error.error(ErrorCode.X_42507); } Grantee grantee = get(granteeName); if (grantee == null) { throw Error.error(ErrorCode.X_28000, granteeName); } ...
[ "public", "void", "revoke", "(", "String", "granteeName", ",", "String", "roleName", ",", "Grantee", "grantor", ")", "{", "if", "(", "!", "grantor", ".", "isAdmin", "(", ")", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_42507", "...
Revoke a role from a Grantee
[ "Revoke", "a", "role", "from", "a", "Grantee" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java#L340-L360
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java
GranteeManager.removeEmptyRole
void removeEmptyRole(Grantee role) { for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); grantee.roles.remove(role); } }
java
void removeEmptyRole(Grantee role) { for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); grantee.roles.remove(role); } }
[ "void", "removeEmptyRole", "(", "Grantee", "role", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "map", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Grantee", "grantee", "=", "(", "Grantee", ")", "map", ".", "get", "(", "i", ...
Removes a role without any privileges from all grantees
[ "Removes", "a", "role", "without", "any", "privileges", "from", "all", "grantees" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java#L410-L417
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java
GranteeManager.removeDbObject
public void removeDbObject(HsqlName name) { for (int i = 0; i < map.size(); i++) { Grantee g = (Grantee) map.get(i); g.revokeDbObject(name); } }
java
public void removeDbObject(HsqlName name) { for (int i = 0; i < map.size(); i++) { Grantee g = (Grantee) map.get(i); g.revokeDbObject(name); } }
[ "public", "void", "removeDbObject", "(", "HsqlName", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "map", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Grantee", "g", "=", "(", "Grantee", ")", "map", ".", "get", "(", ...
Removes all rights mappings for the database object identified by the dbobject argument from all Grantee objects in the set.
[ "Removes", "all", "rights", "mappings", "for", "the", "database", "object", "identified", "by", "the", "dbobject", "argument", "from", "all", "Grantee", "objects", "in", "the", "set", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java#L423-L430
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java
GranteeManager.updateAllRights
void updateAllRights(Grantee role) { for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); if (grantee.isRole) { grantee.updateNestedRoles(role); } } for (int i = 0; i < map.size(); i++) { Grantee grantee...
java
void updateAllRights(Grantee role) { for (int i = 0; i < map.size(); i++) { Grantee grantee = (Grantee) map.get(i); if (grantee.isRole) { grantee.updateNestedRoles(role); } } for (int i = 0; i < map.size(); i++) { Grantee grantee...
[ "void", "updateAllRights", "(", "Grantee", "role", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "map", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Grantee", "grantee", "=", "(", "Grantee", ")", "map", ".", "get", "(", "i", ...
First updates all ROLE Grantee objects. Then updates all USER Grantee Objects.
[ "First", "updates", "all", "ROLE", "Grantee", "objects", ".", "Then", "updates", "all", "USER", "Grantee", "Objects", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java#L451-L468
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java
GranteeManager.getRole
public Grantee getRole(String name) { Grantee g = (Grantee) roleMap.get(name); if (g == null) { throw Error.error(ErrorCode.X_0P000, name); } return g; }
java
public Grantee getRole(String name) { Grantee g = (Grantee) roleMap.get(name); if (g == null) { throw Error.error(ErrorCode.X_0P000, name); } return g; }
[ "public", "Grantee", "getRole", "(", "String", "name", ")", "{", "Grantee", "g", "=", "(", "Grantee", ")", "roleMap", ".", "get", "(", "name", ")", ";", "if", "(", "g", "==", "null", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", ...
Returns Grantee for the named Role
[ "Returns", "Grantee", "for", "the", "named", "Role" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/GranteeManager.java#L635-L644
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java
TextTable.connect
private void connect(Session session, boolean withReadOnlyData) { // Open new cache: if ((dataSource.length() == 0) || isConnected) { // nothing to do return; } PersistentStore store = database.persistentStoreCollection.getStore(this); this...
java
private void connect(Session session, boolean withReadOnlyData) { // Open new cache: if ((dataSource.length() == 0) || isConnected) { // nothing to do return; } PersistentStore store = database.persistentStoreCollection.getStore(this); this...
[ "private", "void", "connect", "(", "Session", "session", ",", "boolean", "withReadOnlyData", ")", "{", "// Open new cache:", "if", "(", "(", "dataSource", ".", "length", "(", ")", "==", "0", ")", "||", "isConnected", ")", "{", "// nothing to do", "return", "...
connects to the data source
[ "connects", "to", "the", "data", "source" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java#L85-L156
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java
TextTable.disconnect
public void disconnect() { this.store = null; PersistentStore store = database.persistentStoreCollection.getStore(this); store.release(); isConnected = false; }
java
public void disconnect() { this.store = null; PersistentStore store = database.persistentStoreCollection.getStore(this); store.release(); isConnected = false; }
[ "public", "void", "disconnect", "(", ")", "{", "this", ".", "store", "=", "null", ";", "PersistentStore", "store", "=", "database", ".", "persistentStoreCollection", ".", "getStore", "(", "this", ")", ";", "store", ".", "release", "(", ")", ";", "isConnect...
disconnects from the data source
[ "disconnects", "from", "the", "data", "source" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java#L161-L171
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java
TextTable.openCache
private void openCache(Session session, String dataSourceNew, boolean isReversedNew, boolean isReadOnlyNew) { String dataSourceOld = dataSource; boolean isReversedOld = isReversed; boolean isReadOnlyOld = isReadOnly; if (dataSourceNew == null) { ...
java
private void openCache(Session session, String dataSourceNew, boolean isReversedNew, boolean isReadOnlyNew) { String dataSourceOld = dataSource; boolean isReversedOld = isReversed; boolean isReadOnlyOld = isReadOnly; if (dataSourceNew == null) { ...
[ "private", "void", "openCache", "(", "Session", "session", ",", "String", "dataSourceNew", ",", "boolean", "isReversedNew", ",", "boolean", "isReadOnlyNew", ")", "{", "String", "dataSourceOld", "=", "dataSource", ";", "boolean", "isReversedOld", "=", "isReversed", ...
This method does some of the work involved with managing the creation and openning of the cache, the rest is done in Log.java and TextCache.java. Better clarification of the role of the methods is needed.
[ "This", "method", "does", "some", "of", "the", "work", "involved", "with", "managing", "the", "creation", "and", "openning", "of", "the", "cache", "the", "rest", "is", "done", "in", "Log", ".", "java", "and", "TextCache", ".", "java", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java#L180-L206
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java
TextTable.setDataSource
protected void setDataSource(Session session, String dataSourceNew, boolean isReversedNew, boolean createFile) { if (getTableType() == Table.TEMP_TEXT_TABLE) { ; } else { session.getGrantee().checkSchemaUpdateOrGrantRights( getSch...
java
protected void setDataSource(Session session, String dataSourceNew, boolean isReversedNew, boolean createFile) { if (getTableType() == Table.TEMP_TEXT_TABLE) { ; } else { session.getGrantee().checkSchemaUpdateOrGrantRights( getSch...
[ "protected", "void", "setDataSource", "(", "Session", "session", ",", "String", "dataSourceNew", ",", "boolean", "isReversedNew", ",", "boolean", "createFile", ")", "{", "if", "(", "getTableType", "(", ")", "==", "Table", ".", "TEMP_TEXT_TABLE", ")", "{", ";",...
High level command to assign a data source to the table definition. Reassigns only if the data source or direction has changed.
[ "High", "level", "command", "to", "assign", "a", "data", "source", "to", "the", "table", "definition", ".", "Reassigns", "only", "if", "the", "data", "source", "or", "direction", "has", "changed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java#L212-L238
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java
TextTable.checkDataReadOnly
void checkDataReadOnly() { if (dataSource.length() == 0) { throw Error.error(ErrorCode.TEXT_TABLE_UNKNOWN_DATA_SOURCE); } if (isReadOnly) { throw Error.error(ErrorCode.DATA_IS_READONLY); } }
java
void checkDataReadOnly() { if (dataSource.length() == 0) { throw Error.error(ErrorCode.TEXT_TABLE_UNKNOWN_DATA_SOURCE); } if (isReadOnly) { throw Error.error(ErrorCode.DATA_IS_READONLY); } }
[ "void", "checkDataReadOnly", "(", ")", "{", "if", "(", "dataSource", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "TEXT_TABLE_UNKNOWN_DATA_SOURCE", ")", ";", "}", "if", "(", "isReadOnly", ")", "{", ...
Used by INSERT, DELETE, UPDATE operations. This class will return a more appropriate message when there is no data source.
[ "Used", "by", "INSERT", "DELETE", "UPDATE", "operations", ".", "This", "class", "will", "return", "a", "more", "appropriate", "message", "when", "there", "is", "no", "data", "source", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TextTable.java#L280-L289
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.addBatch
@Override public void addBatch() throws SQLException { checkClosed(); if (this.Query.isOfType(VoltSQL.TYPE_EXEC,VoltSQL.TYPE_SELECT)) { throw SQLError.get(SQLError.ILLEGAL_STATEMENT, this.Query.toSqlString()); } this.addBatch(this.Query.getExecutableQuery(this.paramet...
java
@Override public void addBatch() throws SQLException { checkClosed(); if (this.Query.isOfType(VoltSQL.TYPE_EXEC,VoltSQL.TYPE_SELECT)) { throw SQLError.get(SQLError.ILLEGAL_STATEMENT, this.Query.toSqlString()); } this.addBatch(this.Query.getExecutableQuery(this.paramet...
[ "@", "Override", "public", "void", "addBatch", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "this", ".", "Query", ".", "isOfType", "(", "VoltSQL", ".", "TYPE_EXEC", ",", "VoltSQL", ".", "TYPE_SELECT", ")", ")", "{", ...
Adds a set of parameters to this PreparedStatement object's batch of commands.
[ "Adds", "a", "set", "of", "parameters", "to", "this", "PreparedStatement", "object", "s", "batch", "of", "commands", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L86-L95
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.execute
@Override public boolean execute() throws SQLException { checkClosed(); boolean result = this.execute(this.Query.getExecutableQuery(this.parameters)); this.parameters = this.Query.getParameterArray(); return result; }
java
@Override public boolean execute() throws SQLException { checkClosed(); boolean result = this.execute(this.Query.getExecutableQuery(this.parameters)); this.parameters = this.Query.getParameterArray(); return result; }
[ "@", "Override", "public", "boolean", "execute", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "boolean", "result", "=", "this", ".", "execute", "(", "this", ".", "Query", ".", "getExecutableQuery", "(", "this", ".", "parameters", ...
Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
[ "Executes", "the", "SQL", "statement", "in", "this", "PreparedStatement", "object", "which", "may", "be", "any", "kind", "of", "SQL", "statement", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L106-L113
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.executeQuery
@Override public ResultSet executeQuery() throws SQLException { checkClosed(); if (!this.Query.isOfType(VoltSQL.TYPE_EXEC,VoltSQL.TYPE_SELECT)) { throw SQLError.get(SQLError.ILLEGAL_STATEMENT, this.Query.toSqlString()); } ResultSet result = this.executeQuery(this.Quer...
java
@Override public ResultSet executeQuery() throws SQLException { checkClosed(); if (!this.Query.isOfType(VoltSQL.TYPE_EXEC,VoltSQL.TYPE_SELECT)) { throw SQLError.get(SQLError.ILLEGAL_STATEMENT, this.Query.toSqlString()); } ResultSet result = this.executeQuery(this.Quer...
[ "@", "Override", "public", "ResultSet", "executeQuery", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "!", "this", ".", "Query", ".", "isOfType", "(", "VoltSQL", ".", "TYPE_EXEC", ",", "VoltSQL", ".", "TYPE_SELECT", ")",...
Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
[ "Executes", "the", "SQL", "query", "in", "this", "PreparedStatement", "object", "and", "returns", "the", "ResultSet", "object", "generated", "by", "the", "query", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L116-L126
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setArray
@Override public void setArray(int parameterIndex, Array x) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
java
@Override public void setArray(int parameterIndex, Array x) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setArray", "(", "int", "parameterIndex", ",", "Array", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given java.sql.Array object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "Array", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L158-L163
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setByte
@Override public void setByte(int parameterIndex, byte x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setByte(int parameterIndex, byte x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setByte", "(", "int", "parameterIndex", ",", "byte", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=", "...
Sets the designated parameter to the given Java byte value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "byte", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L254-L259
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setBytes
@Override public void setBytes(int parameterIndex, byte[] x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setBytes(int parameterIndex, byte[] x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setBytes", "(", "int", "parameterIndex", ",", "byte", "[", "]", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", ...
Sets the designated parameter to the given Java array of bytes.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "array", "of", "bytes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L262-L267
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setCharacterStream
@Override public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
java
@Override public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setCharacterStream", "(", "int", "parameterIndex", ",", "Reader", "reader", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}"...
Sets the designated parameter to the given Reader object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Reader", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L270-L275
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setDouble
@Override public void setDouble(int parameterIndex, double x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setDouble(int parameterIndex, double x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setDouble", "(", "int", "parameterIndex", ",", "double", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=",...
Sets the designated parameter to the given Java double value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "double", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L334-L339
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setFloat
@Override public void setFloat(int parameterIndex, float x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = (double) x; }
java
@Override public void setFloat(int parameterIndex, float x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = (double) x; }
[ "@", "Override", "public", "void", "setFloat", "(", "int", "parameterIndex", ",", "float", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=", ...
Sets the designated parameter to the given Java float value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "float", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L342-L347
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setInt
@Override public void setInt(int parameterIndex, int x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setInt(int parameterIndex, int x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setInt", "(", "int", "parameterIndex", ",", "int", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=", "x"...
Sets the designated parameter to the given Java int value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "int", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L350-L355
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setLong
@Override public void setLong(int parameterIndex, long x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setLong(int parameterIndex, long x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setLong", "(", "int", "parameterIndex", ",", "long", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=", "...
Sets the designated parameter to the given Java long value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "long", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L358-L363
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setNString
@Override public void setNString(int parameterIndex, String value) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
java
@Override public void setNString(int parameterIndex, String value) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setNString", "(", "int", "parameterIndex", ",", "String", "value", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated paramter to the given String object.
[ "Sets", "the", "designated", "paramter", "to", "the", "given", "String", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L406-L411
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setNull
@Override public void setNull(int parameterIndex, int sqlType) throws SQLException { checkParameterBounds(parameterIndex); switch(sqlType) { case Types.TINYINT: this.parameters[parameterIndex-1] = VoltType.NULL_TINYINT; break; case ...
java
@Override public void setNull(int parameterIndex, int sqlType) throws SQLException { checkParameterBounds(parameterIndex); switch(sqlType) { case Types.TINYINT: this.parameters[parameterIndex-1] = VoltType.NULL_TINYINT; break; case ...
[ "@", "Override", "public", "void", "setNull", "(", "int", "parameterIndex", ",", "int", "sqlType", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "switch", "(", "sqlType", ")", "{", "case", "Types", ".", "TINYINT",...
Sets the designated parameter to SQL NULL.
[ "Sets", "the", "designated", "parameter", "to", "SQL", "NULL", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L414-L451
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setObject
@Override public void setObject(int parameterIndex, Object x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setObject(int parameterIndex, Object x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setObject", "(", "int", "parameterIndex", ",", "Object", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=",...
Sets the value of the designated parameter using the given object.
[ "Sets", "the", "value", "of", "the", "designated", "parameter", "using", "the", "given", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L461-L466
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setShort
@Override public void setShort(int parameterIndex, short x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setShort(int parameterIndex, short x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setShort", "(", "int", "parameterIndex", ",", "short", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=", ...
Sets the designated parameter to the given Java short value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "Java", "short", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L534-L539
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setTimestamp
@Override public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
java
@Override public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setTimestamp", "(", "int", "parameterIndex", ",", "Timestamp", "x", ",", "Calendar", "cal", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(...
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "Timestamp", "value", "using", "the", "given", "Calendar", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L582-L587
train
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setURL
@Override public void setURL(int parameterIndex, URL x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_STRING_OR_VARBINARY : x.toString(); }
java
@Override public void setURL(int parameterIndex, URL x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_STRING_OR_VARBINARY : x.toString(); }
[ "@", "Override", "public", "void", "setURL", "(", "int", "parameterIndex", ",", "URL", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=", "x"...
Sets the designated parameter to the given java.net.URL value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "net", ".", "URL", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L599-L604
train
VoltDB/voltdb
src/frontend/org/voltdb/importer/AbstractImporterFactory.java
AbstractImporterFactory.createImporter
public final AbstractImporter createImporter(ImporterConfig config) { AbstractImporter importer = create(config); importer.setImportServerAdapter(m_importServerAdapter); return importer; }
java
public final AbstractImporter createImporter(ImporterConfig config) { AbstractImporter importer = create(config); importer.setImportServerAdapter(m_importServerAdapter); return importer; }
[ "public", "final", "AbstractImporter", "createImporter", "(", "ImporterConfig", "config", ")", "{", "AbstractImporter", "importer", "=", "create", "(", "config", ")", ";", "importer", ".", "setImportServerAdapter", "(", "m_importServerAdapter", ")", ";", "return", "...
Method that is used by the importer framework classes to create an importer instance and wire it correctly for use within the server. @param config configuration information required to create an importer instance @return importer instance created for the given configuration
[ "Method", "that", "is", "used", "by", "the", "importer", "framework", "classes", "to", "create", "an", "importer", "instance", "and", "wire", "it", "correctly", "for", "use", "within", "the", "server", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporterFactory.java#L75-L80
train
VoltDB/voltdb
src/frontend/org/voltdb/types/VoltDecimalHelper.java
VoltDecimalHelper.expandToLength16
private static final byte[] expandToLength16(byte scaledValue[], final boolean isNegative) { if (scaledValue.length == 16) { return scaledValue; } byte replacement[] = new byte[16]; if (isNegative) { Arrays.fill(replacement, (byte)-1); } int shift ...
java
private static final byte[] expandToLength16(byte scaledValue[], final boolean isNegative) { if (scaledValue.length == 16) { return scaledValue; } byte replacement[] = new byte[16]; if (isNegative) { Arrays.fill(replacement, (byte)-1); } int shift ...
[ "private", "static", "final", "byte", "[", "]", "expandToLength16", "(", "byte", "scaledValue", "[", "]", ",", "final", "boolean", "isNegative", ")", "{", "if", "(", "scaledValue", ".", "length", "==", "16", ")", "{", "return", "scaledValue", ";", "}", "...
Converts BigInteger's byte representation containing a scaled magnitude to a fixed size 16 byte array and set the sign in the most significant byte's most significant bit. @param scaledValue Scaled twos complement representation of the decimal @param isNegative Determines whether the sign bit is set @return
[ "Converts", "BigInteger", "s", "byte", "representation", "containing", "a", "scaled", "magnitude", "to", "a", "fixed", "size", "16", "byte", "array", "and", "set", "the", "sign", "in", "the", "most", "significant", "byte", "s", "most", "significant", "bit", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/VoltDecimalHelper.java#L162-L175
train
VoltDB/voltdb
src/frontend/org/voltdb/types/VoltDecimalHelper.java
VoltDecimalHelper.deserializeBigDecimalFromString
public static BigDecimal deserializeBigDecimalFromString(String decimal) throws IOException { if (decimal == null) { return null; } BigDecimal bd = new BigDecimal(decimal); // if the scale is too large, check for trailing zeros if (bd.scale() > kDefaultScale) { ...
java
public static BigDecimal deserializeBigDecimalFromString(String decimal) throws IOException { if (decimal == null) { return null; } BigDecimal bd = new BigDecimal(decimal); // if the scale is too large, check for trailing zeros if (bd.scale() > kDefaultScale) { ...
[ "public", "static", "BigDecimal", "deserializeBigDecimalFromString", "(", "String", "decimal", ")", "throws", "IOException", "{", "if", "(", "decimal", "==", "null", ")", "{", "return", "null", ";", "}", "BigDecimal", "bd", "=", "new", "BigDecimal", "(", "deci...
Deserialize a Volt fixed precision and scale 16-byte decimal from a String representation @param decimal <code>String</code> representation of the decimal
[ "Deserialize", "a", "Volt", "fixed", "precision", "and", "scale", "16", "-", "byte", "decimal", "from", "a", "String", "representation" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/VoltDecimalHelper.java#L268-L290
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/Collector.java
Collector.isFileModifiedInCollectionPeriod
private static boolean isFileModifiedInCollectionPeriod(File file){ long diff = m_currentTimeMillis - file.lastModified(); if(diff >= 0) { return TimeUnit.MILLISECONDS.toDays(diff)+1 <= m_config.days; } return false; }
java
private static boolean isFileModifiedInCollectionPeriod(File file){ long diff = m_currentTimeMillis - file.lastModified(); if(diff >= 0) { return TimeUnit.MILLISECONDS.toDays(diff)+1 <= m_config.days; } return false; }
[ "private", "static", "boolean", "isFileModifiedInCollectionPeriod", "(", "File", "file", ")", "{", "long", "diff", "=", "m_currentTimeMillis", "-", "file", ".", "lastModified", "(", ")", ";", "if", "(", "diff", ">=", "0", ")", "{", "return", "TimeUnit", ".",...
value of diff = 0 indicates current day
[ "value", "of", "diff", "=", "0", "indicates", "current", "day" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/Collector.java#L420-L426
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionValue.java
ExpressionValue.voltMutateToBigintType
public static boolean voltMutateToBigintType(Expression maybeConstantNode, Expression parent, int childIndex) { if (maybeConstantNode.opType == OpTypes.VALUE && maybeConstantNode.dataType != null && maybeConstantNode.dataType.isBinaryType()) { ExpressionValue exprVal ...
java
public static boolean voltMutateToBigintType(Expression maybeConstantNode, Expression parent, int childIndex) { if (maybeConstantNode.opType == OpTypes.VALUE && maybeConstantNode.dataType != null && maybeConstantNode.dataType.isBinaryType()) { ExpressionValue exprVal ...
[ "public", "static", "boolean", "voltMutateToBigintType", "(", "Expression", "maybeConstantNode", ",", "Expression", "parent", ",", "int", "childIndex", ")", "{", "if", "(", "maybeConstantNode", ".", "opType", "==", "OpTypes", ".", "VALUE", "&&", "maybeConstantNode",...
Given a ExpressionValue that is a VARBINARY constant, convert it to a BIGINT constant. Returns true for a successful conversion and false otherwise. For more details on how the conversion is performed, see BinaryData.toLong(). @param parent Reference of parent expression @param childIndex Index of this node in...
[ "Given", "a", "ExpressionValue", "that", "is", "a", "VARBINARY", "constant", "convert", "it", "to", "a", "BIGINT", "constant", ".", "Returns", "true", "for", "a", "successful", "conversion", "and", "false", "otherwise", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionValue.java#L116-L131
train