id
int32
0
165k
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
61,400
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getInt
@Override public int getInt(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { Long longValue = getPrivateInteger(columnIndex); if (longValue > Integer.MAX_VALUE || longValue < Integer.MIN_VALUE) { throw new SQLException("Value out of...
java
@Override public int getInt(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { Long longValue = getPrivateInteger(columnIndex); if (longValue > Integer.MAX_VALUE || longValue < Integer.MIN_VALUE) { throw new SQLException("Value out of...
[ "@", "Override", "public", "int", "getInt", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "try", "{", "Long", "longValue", "=", "getPrivateInteger", "(", "columnIndex", ")", ";", "if", "(", ...
ResultSet object as an int in the Java programming language.
[ "ResultSet", "object", "as", "an", "int", "in", "the", "Java", "programming", "language", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L678-L690
61,401
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getLong
@Override public long getLong(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { Long longValue = getPrivateInteger(columnIndex); return longValue; } catch (Exception x) { throw SQLError.get(x); } }
java
@Override public long getLong(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { Long longValue = getPrivateInteger(columnIndex); return longValue; } catch (Exception x) { throw SQLError.get(x); } }
[ "@", "Override", "public", "long", "getLong", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "try", "{", "Long", "longValue", "=", "getPrivateInteger", "(", "columnIndex", ")", ";", "return", "...
ResultSet object as a long in the Java programming language.
[ "ResultSet", "object", "as", "a", "long", "in", "the", "Java", "programming", "language", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L701-L710
61,402
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getNCharacterStream
@Override public Reader getNCharacterStream(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { String value = table.getString(columnIndex - 1); if (!wasNull()) return new StringReader(value); return null; } catch (...
java
@Override public Reader getNCharacterStream(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { String value = table.getString(columnIndex - 1); if (!wasNull()) return new StringReader(value); return null; } catch (...
[ "@", "Override", "public", "Reader", "getNCharacterStream", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "try", "{", "String", "value", "=", "table", ".", "getString", "(", "columnIndex", "-", ...
ResultSet object as a java.io.Reader object.
[ "ResultSet", "object", "as", "a", "java", ".", "io", ".", "Reader", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L729-L740
61,403
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getNClob
@Override public NClob getNClob(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { return new JDBC4NClob(table.getString(columnIndex - 1) .toCharArray()); } catch (Exception x) { throw SQLError.get(x); } }
java
@Override public NClob getNClob(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { return new JDBC4NClob(table.getString(columnIndex - 1) .toCharArray()); } catch (Exception x) { throw SQLError.get(x); } }
[ "@", "Override", "public", "NClob", "getNClob", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "try", "{", "return", "new", "JDBC4NClob", "(", "table", ".", "getString", "(", "columnIndex", "-"...
ResultSet object as a NClob object in the Java programming language.
[ "ResultSet", "object", "as", "a", "NClob", "object", "in", "the", "Java", "programming", "language", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L751-L760
61,404
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getObject
@Override public Object getObject(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { VoltType type = table.getColumnType(columnIndex - 1); if (type == VoltType.TIMESTAMP) return getTimestamp(columnIndex); else ...
java
@Override public Object getObject(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { VoltType type = table.getColumnType(columnIndex - 1); if (type == VoltType.TIMESTAMP) return getTimestamp(columnIndex); else ...
[ "@", "Override", "public", "Object", "getObject", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "try", "{", "VoltType", "type", "=", "table", ".", "getColumnType", "(", "columnIndex", "-", "1"...
ResultSet object as an Object in the Java programming language.
[ "ResultSet", "object", "as", "an", "Object", "in", "the", "Java", "programming", "language", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L790-L802
61,405
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getShort
@Override public short getShort(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { Long longValue = getPrivateInteger(columnIndex); if (longValue > Short.MAX_VALUE || longValue < Short.MIN_VALUE) { throw new SQLException("Value out of...
java
@Override public short getShort(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); try { Long longValue = getPrivateInteger(columnIndex); if (longValue > Short.MAX_VALUE || longValue < Short.MIN_VALUE) { throw new SQLException("Value out of...
[ "@", "Override", "public", "short", "getShort", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "try", "{", "Long", "longValue", "=", "getPrivateInteger", "(", "columnIndex", ")", ";", "if", "("...
ResultSet object as a short in the Java programming language.
[ "ResultSet", "object", "as", "a", "short", "in", "the", "Java", "programming", "language", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L879-L891
61,406
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getUnicodeStream
@Override @Deprecated public InputStream getUnicodeStream(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); throw SQLError.noSupport(); }
java
@Override @Deprecated public InputStream getUnicodeStream(int columnIndex) throws SQLException { checkColumnBounds(columnIndex); throw SQLError.noSupport(); }
[ "@", "Override", "@", "Deprecated", "public", "InputStream", "getUnicodeStream", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "checkColumnBounds", "(", "columnIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Deprecated. use getCharacterStream in place of getUnicodeStream
[ "Deprecated", ".", "use", "getCharacterStream", "in", "place", "of", "getUnicodeStream" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1039-L1044
61,407
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getUnicodeStream
@Override @Deprecated public InputStream getUnicodeStream(String columnLabel) throws SQLException { return getUnicodeStream(findColumn(columnLabel)); }
java
@Override @Deprecated public InputStream getUnicodeStream(String columnLabel) throws SQLException { return getUnicodeStream(findColumn(columnLabel)); }
[ "@", "Override", "@", "Deprecated", "public", "InputStream", "getUnicodeStream", "(", "String", "columnLabel", ")", "throws", "SQLException", "{", "return", "getUnicodeStream", "(", "findColumn", "(", "columnLabel", ")", ")", ";", "}" ]
Deprecated. use getCharacterStream instead
[ "Deprecated", ".", "use", "getCharacterStream", "instead" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1047-L1051
61,408
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.last
@Override public boolean last() throws SQLException { checkClosed(); if (rowCount == 0) { return false; } try { if (cursorPosition != Position.middle) { cursorPosition = Position.middle; table.resetRowPosition(); ...
java
@Override public boolean last() throws SQLException { checkClosed(); if (rowCount == 0) { return false; } try { if (cursorPosition != Position.middle) { cursorPosition = Position.middle; table.resetRowPosition(); ...
[ "@", "Override", "public", "boolean", "last", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "rowCount", "==", "0", ")", "{", "return", "false", ";", "}", "try", "{", "if", "(", "cursorPosition", "!=", "Position", "."...
Moves the cursor to the last row in this ResultSet object.
[ "Moves", "the", "cursor", "to", "the", "last", "row", "in", "this", "ResultSet", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1145-L1161
61,409
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.next
@Override public boolean next() throws SQLException { checkClosed(); if (cursorPosition == Position.afterLast || table.getActiveRowIndex() == rowCount - 1) { cursorPosition = Position.afterLast; return false; } if (cursorPosition == Position.beforeFirst) { ...
java
@Override public boolean next() throws SQLException { checkClosed(); if (cursorPosition == Position.afterLast || table.getActiveRowIndex() == rowCount - 1) { cursorPosition = Position.afterLast; return false; } if (cursorPosition == Position.beforeFirst) { ...
[ "@", "Override", "public", "boolean", "next", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "cursorPosition", "==", "Position", ".", "afterLast", "||", "table", ".", "getActiveRowIndex", "(", ")", "==", "rowCount", "-", ...
Moves the cursor forward one row from its current position.
[ "Moves", "the", "cursor", "forward", "one", "row", "from", "its", "current", "position", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1179-L1194
61,410
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.previous
@Override public boolean previous() throws SQLException { checkClosed(); if (cursorPosition == Position.afterLast) { return last(); } if (cursorPosition == Position.beforeFirst || table.getActiveRowIndex() <= 0) { beforeFirst(); return false; ...
java
@Override public boolean previous() throws SQLException { checkClosed(); if (cursorPosition == Position.afterLast) { return last(); } if (cursorPosition == Position.beforeFirst || table.getActiveRowIndex() <= 0) { beforeFirst(); return false; ...
[ "@", "Override", "public", "boolean", "previous", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "cursorPosition", "==", "Position", ".", "afterLast", ")", "{", "return", "last", "(", ")", ";", "}", "if", "(", "cursorPo...
Moves the cursor to the previous row in this ResultSet object.
[ "Moves", "the", "cursor", "to", "the", "previous", "row", "in", "this", "ResultSet", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1197-L1215
61,411
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.relative
@Override public boolean relative(int rows) throws SQLException { checkClosed(); if (rowCount == 0) { return false; } if (cursorPosition == Position.afterLast && rows > 0) { return false; } if (cursorPosition == Position.beforeFirst && rows <=...
java
@Override public boolean relative(int rows) throws SQLException { checkClosed(); if (rowCount == 0) { return false; } if (cursorPosition == Position.afterLast && rows > 0) { return false; } if (cursorPosition == Position.beforeFirst && rows <=...
[ "@", "Override", "public", "boolean", "relative", "(", "int", "rows", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "rowCount", "==", "0", ")", "{", "return", "false", ";", "}", "if", "(", "cursorPosition", "==", "Position"...
Moves the cursor a relative number of rows, either positive or negative.
[ "Moves", "the", "cursor", "a", "relative", "number", "of", "rows", "either", "positive", "or", "negative", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1224-L1270
61,412
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.setFetchDirection
@Override public void setFetchDirection(int direction) throws SQLException { if ((direction != FETCH_FORWARD) && (direction != FETCH_REVERSE) && (direction != FETCH_UNKNOWN)) throw SQLError.get(SQLError.ILLEGAL_STATEMENT, direction); this.fetchDirection = direction; }
java
@Override public void setFetchDirection(int direction) throws SQLException { if ((direction != FETCH_FORWARD) && (direction != FETCH_REVERSE) && (direction != FETCH_UNKNOWN)) throw SQLError.get(SQLError.ILLEGAL_STATEMENT, direction); this.fetchDirection = direction; }
[ "@", "Override", "public", "void", "setFetchDirection", "(", "int", "direction", ")", "throws", "SQLException", "{", "if", "(", "(", "direction", "!=", "FETCH_FORWARD", ")", "&&", "(", "direction", "!=", "FETCH_REVERSE", ")", "&&", "(", "direction", "!=", "F...
object will be processed.
[ "object", "will", "be", "processed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1292-L1298
61,413
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.updateAsciiStream
@Override public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { throw SQLError.noSupport(); }
java
@Override public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "updateAsciiStream", "(", "String", "columnLabel", ",", "InputStream", "x", ",", "long", "length", ")", "throws", "SQLException", "{", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
the specified number of bytes.
[ "the", "specified", "number", "of", "bytes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1362-L1366
61,414
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.updateBlob
@Override public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { throw SQLError.noSupport(); }
java
@Override public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "updateBlob", "(", "String", "columnLabel", ",", "InputStream", "inputStream", ",", "long", "length", ")", "throws", "SQLException", "{", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
have the specified number of bytes.
[ "have", "the", "specified", "number", "of", "bytes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1464-L1468
61,415
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.updateNClob
@Override public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { throw SQLError.noSupport(); }
java
@Override public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "updateNClob", "(", "String", "columnLabel", ",", "Reader", "reader", ",", "long", "length", ")", "throws", "SQLException", "{", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
given number of characters long.
[ "given", "number", "of", "characters", "long", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1721-L1725
61,416
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.updateObject
@Override public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { throw SQLError.noSupport(); }
java
@Override public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException { throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "updateObject", "(", "String", "columnLabel", ",", "Object", "x", ",", "int", "scaleOrLength", ")", "throws", "SQLException", "{", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Updates the designated column with an Object value.
[ "Updates", "the", "designated", "column", "with", "an", "Object", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1773-L1777
61,417
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.wasNull
@Override public boolean wasNull() throws SQLException { checkClosed(); try { return table.wasNull(); } catch (Exception x) { throw SQLError.get(x); } }
java
@Override public boolean wasNull() throws SQLException { checkClosed(); try { return table.wasNull(); } catch (Exception x) { throw SQLError.get(x); } }
[ "@", "Override", "public", "boolean", "wasNull", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "try", "{", "return", "table", ".", "wasNull", "(", ")", ";", "}", "catch", "(", "Exception", "x", ")", "{", "throw", "SQLError", "....
Reports whether the last column read had a value of SQL NULL.
[ "Reports", "whether", "the", "last", "column", "read", "had", "a", "value", "of", "SQL", "NULL", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1875-L1883
61,418
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java
JDBC4ResultSet.getRowData
public Object[] getRowData() throws SQLException { Object[] row = new Object[columnCount]; for (int i = 1; i < columnCount + 1; i++) { row[i - 1] = getObject(i); } return row; }
java
public Object[] getRowData() throws SQLException { Object[] row = new Object[columnCount]; for (int i = 1; i < columnCount + 1; i++) { row[i - 1] = getObject(i); } return row; }
[ "public", "Object", "[", "]", "getRowData", "(", ")", "throws", "SQLException", "{", "Object", "[", "]", "row", "=", "new", "Object", "[", "columnCount", "]", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "columnCount", "+", "1", ";", "i", ...
Retrieve the raw row data as an array
[ "Retrieve", "the", "raw", "row", "data", "as", "an", "array" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L1909-L1915
61,419
VoltDB/voltdb
examples/callcenter/client/callcenter/NetworkSadnessTransformer.java
NetworkSadnessTransformer.transformAndQueue
void transformAndQueue(T event, long systemCurrentTimeMillis) { // if you're super unlucky, this blows up the stack if (rand.nextDouble() < 0.05) { // duplicate this message (note recursion means maybe more than duped) transformAndQueue(event, systemCurrentTimeMillis); } ...
java
void transformAndQueue(T event, long systemCurrentTimeMillis) { // if you're super unlucky, this blows up the stack if (rand.nextDouble() < 0.05) { // duplicate this message (note recursion means maybe more than duped) transformAndQueue(event, systemCurrentTimeMillis); } ...
[ "void", "transformAndQueue", "(", "T", "event", ",", "long", "systemCurrentTimeMillis", ")", "{", "// if you're super unlucky, this blows up the stack", "if", "(", "rand", ".", "nextDouble", "(", ")", "<", "0.05", ")", "{", "// duplicate this message (note recursion means...
Possibly duplicate and delay by some random amount.
[ "Possibly", "duplicate", "and", "delay", "by", "some", "random", "amount", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/NetworkSadnessTransformer.java#L85-L94
61,420
VoltDB/voltdb
examples/callcenter/client/callcenter/NetworkSadnessTransformer.java
NetworkSadnessTransformer.next
@Override public T next(long systemCurrentTimeMillis) { // drain all the waiting messages from the source (up to 10k) while (delayed.size() < 10000) { T event = source.next(systemCurrentTimeMillis); if (event == null) { break; } transfo...
java
@Override public T next(long systemCurrentTimeMillis) { // drain all the waiting messages from the source (up to 10k) while (delayed.size() < 10000) { T event = source.next(systemCurrentTimeMillis); if (event == null) { break; } transfo...
[ "@", "Override", "public", "T", "next", "(", "long", "systemCurrentTimeMillis", ")", "{", "// drain all the waiting messages from the source (up to 10k)", "while", "(", "delayed", ".", "size", "(", ")", "<", "10000", ")", "{", "T", "event", "=", "source", ".", "...
Return the next event that is safe for delivery or null if there are no safe objects to deliver. Null response could mean no events, or could mean all events are scheduled for the future. @param systemCurrentTimeMillis The current time.
[ "Return", "the", "next", "event", "that", "is", "safe", "for", "delivery", "or", "null", "if", "there", "are", "no", "safe", "objects", "to", "deliver", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/NetworkSadnessTransformer.java#L105-L117
61,421
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/SchemaColumn.java
SchemaColumn.compareNames
public int compareNames(SchemaColumn that) { String thatTbl; String thisTbl; if (m_tableAlias != null && that.m_tableAlias != null) { thisTbl = m_tableAlias; thatTbl = that.m_tableAlias; } else { thisTbl = m_tableName; thatTbl = th...
java
public int compareNames(SchemaColumn that) { String thatTbl; String thisTbl; if (m_tableAlias != null && that.m_tableAlias != null) { thisTbl = m_tableAlias; thatTbl = that.m_tableAlias; } else { thisTbl = m_tableName; thatTbl = th...
[ "public", "int", "compareNames", "(", "SchemaColumn", "that", ")", "{", "String", "thatTbl", ";", "String", "thisTbl", ";", "if", "(", "m_tableAlias", "!=", "null", "&&", "that", ".", "m_tableAlias", "!=", "null", ")", "{", "thisTbl", "=", "m_tableAlias", ...
Compare this schema column to the input. Two SchemaColumns are compared thus: - Compare the table aliases or names, preferring to compare aliases if not null for both sides. - Compare the column names or aliases, preferring to compare names if not null for both sides.
[ "Compare", "this", "schema", "column", "to", "the", "input", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/SchemaColumn.java#L145-L176
61,422
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/SchemaColumn.java
SchemaColumn.copyAndReplaceWithTVE
public SchemaColumn copyAndReplaceWithTVE(int colIndex) { TupleValueExpression newTve; if (m_expression instanceof TupleValueExpression) { newTve = (TupleValueExpression) m_expression.clone(); newTve.setColumnIndex(colIndex); } else { newTve = new Tupl...
java
public SchemaColumn copyAndReplaceWithTVE(int colIndex) { TupleValueExpression newTve; if (m_expression instanceof TupleValueExpression) { newTve = (TupleValueExpression) m_expression.clone(); newTve.setColumnIndex(colIndex); } else { newTve = new Tupl...
[ "public", "SchemaColumn", "copyAndReplaceWithTVE", "(", "int", "colIndex", ")", "{", "TupleValueExpression", "newTve", ";", "if", "(", "m_expression", "instanceof", "TupleValueExpression", ")", "{", "newTve", "=", "(", "TupleValueExpression", ")", "m_expression", ".",...
Return a copy of this SchemaColumn, but with the input expression replaced by an appropriate TupleValueExpression. @param colIndex
[ "Return", "a", "copy", "of", "this", "SchemaColumn", "but", "with", "the", "input", "expression", "replaced", "by", "an", "appropriate", "TupleValueExpression", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/SchemaColumn.java#L201-L215
61,423
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpTransactionTaskQueue.java
MpTransactionTaskQueue.offer
@Override synchronized void offer(TransactionTask task) { Iv2Trace.logTransactionTaskQueueOffer(task); m_backlog.addLast(task); taskQueueOffer(); }
java
@Override synchronized void offer(TransactionTask task) { Iv2Trace.logTransactionTaskQueueOffer(task); m_backlog.addLast(task); taskQueueOffer(); }
[ "@", "Override", "synchronized", "void", "offer", "(", "TransactionTask", "task", ")", "{", "Iv2Trace", ".", "logTransactionTaskQueueOffer", "(", "task", ")", ";", "m_backlog", ".", "addLast", "(", "task", ")", ";", "taskQueueOffer", "(", ")", ";", "}" ]
Stick this task in the backlog. Many network threads may be racing to reach here, synchronize to serialize queue order. Always returns true in this case, side effect of extending TransactionTaskQueue.
[ "Stick", "this", "task", "in", "the", "backlog", ".", "Many", "network", "threads", "may", "be", "racing", "to", "reach", "here", "synchronize", "to", "serialize", "queue", "order", ".", "Always", "returns", "true", "in", "this", "case", "side", "effect", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpTransactionTaskQueue.java#L88-L94
61,424
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/NIOLockFile.java
NIOLockFile.aquireFileLock
private boolean aquireFileLock() { // PRE: // // raf is never null and is never closed upon entry. // // Rhetorical question to self: How does one tell if a RandomAccessFile // is closed, short of invoking an operation and getting an IOException // the says its c...
java
private boolean aquireFileLock() { // PRE: // // raf is never null and is never closed upon entry. // // Rhetorical question to self: How does one tell if a RandomAccessFile // is closed, short of invoking an operation and getting an IOException // the says its c...
[ "private", "boolean", "aquireFileLock", "(", ")", "{", "// PRE:", "//", "// raf is never null and is never closed upon entry.", "//", "// Rhetorical question to self: How does one tell if a RandomAccessFile", "// is closed, short of invoking an operation and getting an IOException", "// the ...
does the real work of aquiring the FileLock
[ "does", "the", "real", "work", "of", "aquiring", "the", "FileLock" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/NIOLockFile.java#L370-L447
61,425
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/NIOLockFile.java
NIOLockFile.releaseFileLock
private boolean releaseFileLock() { // Note: Closing the super class RandomAccessFile has the // side-effect of closing the file lock's FileChannel, // so we do not deal with this here. boolean success = false; if (this.fileLock == null) { success = t...
java
private boolean releaseFileLock() { // Note: Closing the super class RandomAccessFile has the // side-effect of closing the file lock's FileChannel, // so we do not deal with this here. boolean success = false; if (this.fileLock == null) { success = t...
[ "private", "boolean", "releaseFileLock", "(", ")", "{", "// Note: Closing the super class RandomAccessFile has the", "// side-effect of closing the file lock's FileChannel,", "// so we do not deal with this here.", "boolean", "success", "=", "false", ";", "if", "(", "t...
does the real work of releasing the FileLock
[ "does", "the", "real", "work", "of", "releasing", "the", "FileLock" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/NIOLockFile.java#L450-L471
61,426
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java
BaseHashMap.addOrRemove
protected Object addOrRemove(int intKey, Object objectValue, boolean remove) { int hash = intKey; int index = hashIndex.getHashIndex(hash); int lookup = hashIndex.hashTable[index]; int lastLookup = -1; Object return...
java
protected Object addOrRemove(int intKey, Object objectValue, boolean remove) { int hash = intKey; int index = hashIndex.getHashIndex(hash); int lookup = hashIndex.hashTable[index]; int lastLookup = -1; Object return...
[ "protected", "Object", "addOrRemove", "(", "int", "intKey", ",", "Object", "objectValue", ",", "boolean", "remove", ")", "{", "int", "hash", "=", "intKey", ";", "int", "index", "=", "hashIndex", ".", "getHashIndex", "(", "hash", ")", ";", "int", "lookup", ...
type-specific method for adding or removing keys in int->Object maps
[ "type", "-", "specific", "method", "for", "adding", "or", "removing", "keys", "in", "int", "-", ">", "Object", "maps" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java#L603-L680
61,427
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java
BaseHashMap.removeObject
protected Object removeObject(Object objectKey, boolean removeRow) { if (objectKey == null) { return null; } int hash = objectKey.hashCode(); int index = hashIndex.getHashIndex(hash); int lookup = hashIndex.hashTable[index]; int ...
java
protected Object removeObject(Object objectKey, boolean removeRow) { if (objectKey == null) { return null; } int hash = objectKey.hashCode(); int index = hashIndex.getHashIndex(hash); int lookup = hashIndex.hashTable[index]; int ...
[ "protected", "Object", "removeObject", "(", "Object", "objectKey", ",", "boolean", "removeRow", ")", "{", "if", "(", "objectKey", "==", "null", ")", "{", "return", "null", ";", "}", "int", "hash", "=", "objectKey", ".", "hashCode", "(", ")", ";", "int", ...
type specific method for Object sets or Object->Object maps
[ "type", "specific", "method", "for", "Object", "sets", "or", "Object", "-", ">", "Object", "maps" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java#L685-L720
61,428
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java
BaseHashMap.clear
public void clear() { if (hashIndex.modified) { accessCount = 0; accessMin = accessCount; hasZeroKey = false; zeroKeyIndex = -1; clearElementArrays(0, hashIndex.linkTable.length); hashIndex.clear(); if (minimizeOnEmpty)...
java
public void clear() { if (hashIndex.modified) { accessCount = 0; accessMin = accessCount; hasZeroKey = false; zeroKeyIndex = -1; clearElementArrays(0, hashIndex.linkTable.length); hashIndex.clear(); if (minimizeOnEmpty)...
[ "public", "void", "clear", "(", ")", "{", "if", "(", "hashIndex", ".", "modified", ")", "{", "accessCount", "=", "0", ";", "accessMin", "=", "accessCount", ";", "hasZeroKey", "=", "false", ";", "zeroKeyIndex", "=", "-", "1", ";", "clearElementArrays", "(...
Clear the map completely.
[ "Clear", "the", "map", "completely", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java#L1077-L1092
61,429
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java
BaseHashMap.getAccessCountCeiling
public int getAccessCountCeiling(int count, int margin) { return ArrayCounter.rank(accessTable, hashIndex.newNodePointer, count, accessMin + 1, accessCount, margin); }
java
public int getAccessCountCeiling(int count, int margin) { return ArrayCounter.rank(accessTable, hashIndex.newNodePointer, count, accessMin + 1, accessCount, margin); }
[ "public", "int", "getAccessCountCeiling", "(", "int", "count", ",", "int", "margin", ")", "{", "return", "ArrayCounter", ".", "rank", "(", "accessTable", ",", "hashIndex", ".", "newNodePointer", ",", "count", ",", "accessMin", "+", "1", ",", "accessCount", "...
Return the max accessCount value for count elements with the lowest access count. Always return at least accessMin + 1
[ "Return", "the", "max", "accessCount", "value", "for", "count", "elements", "with", "the", "lowest", "access", "count", ".", "Always", "return", "at", "least", "accessMin", "+", "1" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java#L1098-L1101
61,430
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java
BaseHashMap.clear
protected void clear(int count, int margin) { if (margin < 64) { margin = 64; } int maxlookup = hashIndex.newNodePointer; int accessBase = getAccessCountCeiling(count, margin); for (int lookup = 0; lookup < maxlookup; lookup++) { Object o = objectKeyTa...
java
protected void clear(int count, int margin) { if (margin < 64) { margin = 64; } int maxlookup = hashIndex.newNodePointer; int accessBase = getAccessCountCeiling(count, margin); for (int lookup = 0; lookup < maxlookup; lookup++) { Object o = objectKeyTa...
[ "protected", "void", "clear", "(", "int", "count", ",", "int", "margin", ")", "{", "if", "(", "margin", "<", "64", ")", "{", "margin", "=", "64", ";", "}", "int", "maxlookup", "=", "hashIndex", ".", "newNodePointer", ";", "int", "accessBase", "=", "g...
Clear approximately count elements from the map, starting with those with low accessTable ranking. Only for maps with Object key table
[ "Clear", "approximately", "count", "elements", "from", "the", "map", "starting", "with", "those", "with", "low", "accessTable", "ranking", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BaseHashMap.java#L1121-L1139
61,431
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SubQuery.java
SubQuery.materialise
public void materialise(Session session) { PersistentStore store; // table constructors if (isDataExpression) { store = session.sessionData.getSubqueryRowStore(table); dataExpression.insertValuesIntoSubqueryTable(session, store); return; } ...
java
public void materialise(Session session) { PersistentStore store; // table constructors if (isDataExpression) { store = session.sessionData.getSubqueryRowStore(table); dataExpression.insertValuesIntoSubqueryTable(session, store); return; } ...
[ "public", "void", "materialise", "(", "Session", "session", ")", "{", "PersistentStore", "store", ";", "// table constructors", "if", "(", "isDataExpression", ")", "{", "store", "=", "session", ".", "sessionData", ".", "getSubqueryRowStore", "(", "table", ")", "...
Fills the table with a result set
[ "Fills", "the", "table", "with", "a", "result", "set" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SubQuery.java#L176-L203
61,432
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportEncoder.java
ExportEncoder.encodeDecimal
static public void encodeDecimal(final FastSerializer fs, BigDecimal value) throws IOException { fs.write((byte)VoltDecimalHelper.kDefaultScale); fs.write((byte)16); fs.write(VoltDecimalHelper.serializeBigDecimal(value)); }
java
static public void encodeDecimal(final FastSerializer fs, BigDecimal value) throws IOException { fs.write((byte)VoltDecimalHelper.kDefaultScale); fs.write((byte)16); fs.write(VoltDecimalHelper.serializeBigDecimal(value)); }
[ "static", "public", "void", "encodeDecimal", "(", "final", "FastSerializer", "fs", ",", "BigDecimal", "value", ")", "throws", "IOException", "{", "fs", ".", "write", "(", "(", "byte", ")", "VoltDecimalHelper", ".", "kDefaultScale", ")", ";", "fs", ".", "writ...
Read a decimal according to the Export encoding specification. @param fds Fastdeserializer containing Export stream data @return decoded BigDecimal value @throws IOException
[ "Read", "a", "decimal", "according", "to", "the", "Export", "encoding", "specification", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportEncoder.java#L222-L227
61,433
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportEncoder.java
ExportEncoder.encodeGeographyPoint
static public void encodeGeographyPoint(final FastSerializer fs, GeographyPointValue value) throws IOException { final int length = GeographyPointValue.getLengthInBytes(); ByteBuffer bb = ByteBuffer.allocate(length); bb.order(ByteOrder.nativeOrder()); value.flattenToBuffer(bb); ...
java
static public void encodeGeographyPoint(final FastSerializer fs, GeographyPointValue value) throws IOException { final int length = GeographyPointValue.getLengthInBytes(); ByteBuffer bb = ByteBuffer.allocate(length); bb.order(ByteOrder.nativeOrder()); value.flattenToBuffer(bb); ...
[ "static", "public", "void", "encodeGeographyPoint", "(", "final", "FastSerializer", "fs", ",", "GeographyPointValue", "value", ")", "throws", "IOException", "{", "final", "int", "length", "=", "GeographyPointValue", ".", "getLengthInBytes", "(", ")", ";", "ByteBuffe...
Encode a GEOGRAPHY_POINT according to the Export encoding specification. @param fs The serializer to serialize to @throws IOException
[ "Encode", "a", "GEOGRAPHY_POINT", "according", "to", "the", "Export", "encoding", "specification", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportEncoder.java#L315-L326
61,434
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportEncoder.java
ExportEncoder.encodeGeography
static public void encodeGeography(final FastSerializer fs, GeographyValue value) throws IOException { ByteBuffer bb = ByteBuffer.allocate(value.getLengthInBytes()); bb.order(ByteOrder.nativeOrder()); value.flattenToBuffer(bb); byte[] array = bb.array(); fs.writeInt(array.le...
java
static public void encodeGeography(final FastSerializer fs, GeographyValue value) throws IOException { ByteBuffer bb = ByteBuffer.allocate(value.getLengthInBytes()); bb.order(ByteOrder.nativeOrder()); value.flattenToBuffer(bb); byte[] array = bb.array(); fs.writeInt(array.le...
[ "static", "public", "void", "encodeGeography", "(", "final", "FastSerializer", "fs", ",", "GeographyValue", "value", ")", "throws", "IOException", "{", "ByteBuffer", "bb", "=", "ByteBuffer", ".", "allocate", "(", "value", ".", "getLengthInBytes", "(", ")", ")", ...
Encode a GEOGRAPHY according to the Export encoding specification. @param fs The serializer to serialize to @throws IOException
[ "Encode", "a", "GEOGRAPHY", "according", "to", "the", "Export", "encoding", "specification", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportEncoder.java#L334-L343
61,435
VoltDB/voltdb
src/frontend/org/voltdb/NTProcedureService.java
NTProcedureService.loadSystemProcedures
@SuppressWarnings("unchecked") private ImmutableMap<String, ProcedureRunnerNTGenerator> loadSystemProcedures(boolean startup) { ImmutableMap.Builder<String, ProcedureRunnerNTGenerator> builder = ImmutableMap.<String, ProcedureRunnerNTGenerator>builder(); Set<Entry<String,Config>> en...
java
@SuppressWarnings("unchecked") private ImmutableMap<String, ProcedureRunnerNTGenerator> loadSystemProcedures(boolean startup) { ImmutableMap.Builder<String, ProcedureRunnerNTGenerator> builder = ImmutableMap.<String, ProcedureRunnerNTGenerator>builder(); Set<Entry<String,Config>> en...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "ImmutableMap", "<", "String", ",", "ProcedureRunnerNTGenerator", ">", "loadSystemProcedures", "(", "boolean", "startup", ")", "{", "ImmutableMap", ".", "Builder", "<", "String", ",", "ProcedureRunnerNTGen...
Load the system procedures. Optionally don't load UAC but use parameter instead.
[ "Load", "the", "system", "procedures", ".", "Optionally", "don", "t", "load", "UAC", "but", "use", "parameter", "instead", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NTProcedureService.java#L252-L299
61,436
VoltDB/voltdb
src/frontend/org/voltdb/NTProcedureService.java
NTProcedureService.update
@SuppressWarnings("unchecked") synchronized void update(CatalogContext catalogContext) { CatalogMap<Procedure> procedures = catalogContext.database.getProcedures(); Map<String, ProcedureRunnerNTGenerator> runnerGeneratorMap = new TreeMap<>(); for (Procedure procedure : procedures) { ...
java
@SuppressWarnings("unchecked") synchronized void update(CatalogContext catalogContext) { CatalogMap<Procedure> procedures = catalogContext.database.getProcedures(); Map<String, ProcedureRunnerNTGenerator> runnerGeneratorMap = new TreeMap<>(); for (Procedure procedure : procedures) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "synchronized", "void", "update", "(", "CatalogContext", "catalogContext", ")", "{", "CatalogMap", "<", "Procedure", ">", "procedures", "=", "catalogContext", ".", "database", ".", "getProcedures", "(", ")", ";",...
Refresh the NT procedures when the catalog changes.
[ "Refresh", "the", "NT", "procedures", "when", "the", "catalog", "changes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NTProcedureService.java#L312-L360
61,437
VoltDB/voltdb
src/frontend/org/voltdb/NTProcedureService.java
NTProcedureService.callProcedureNT
synchronized void callProcedureNT(final long ciHandle, final AuthUser user, final Connection ccxn, final boolean isAdmin, final boolean ntPriority, ...
java
synchronized void callProcedureNT(final long ciHandle, final AuthUser user, final Connection ccxn, final boolean isAdmin, final boolean ntPriority, ...
[ "synchronized", "void", "callProcedureNT", "(", "final", "long", "ciHandle", ",", "final", "AuthUser", "user", ",", "final", "Connection", "ccxn", ",", "final", "boolean", "isAdmin", ",", "final", "boolean", "ntPriority", ",", "final", "StoredProcedureInvocation", ...
Invoke an NT procedure asynchronously on one of the exec services. @returns ClientResponseImpl if something goes wrong.
[ "Invoke", "an", "NT", "procedure", "asynchronously", "on", "one", "of", "the", "exec", "services", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NTProcedureService.java#L366-L450
61,438
VoltDB/voltdb
src/frontend/org/voltdb/NTProcedureService.java
NTProcedureService.handleCallbacksForFailedHosts
void handleCallbacksForFailedHosts(final Set<Integer> failedHosts) { for (ProcedureRunnerNT runner : m_outstanding.values()) { runner.processAnyCallbacksFromFailedHosts(failedHosts); } }
java
void handleCallbacksForFailedHosts(final Set<Integer> failedHosts) { for (ProcedureRunnerNT runner : m_outstanding.values()) { runner.processAnyCallbacksFromFailedHosts(failedHosts); } }
[ "void", "handleCallbacksForFailedHosts", "(", "final", "Set", "<", "Integer", ">", "failedHosts", ")", "{", "for", "(", "ProcedureRunnerNT", "runner", ":", "m_outstanding", ".", "values", "(", ")", ")", "{", "runner", ".", "processAnyCallbacksFromFailedHosts", "("...
For all-host NT procs, use site failures to call callbacks for hosts that will obviously never respond. ICH and the other plumbing should handle regular, txn procs.
[ "For", "all", "-", "host", "NT", "procs", "use", "site", "failures", "to", "call", "callbacks", "for", "hosts", "that", "will", "obviously", "never", "respond", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NTProcedureService.java#L466-L470
61,439
VoltDB/voltdb
src/frontend/org/voltdb/compiler/statements/CreateFunctionFromMethod.java
CreateFunctionFromMethod.isDefinedFunctionName
private boolean isDefinedFunctionName(String functionName) { return FunctionForVoltDB.isFunctionNameDefined(functionName) || FunctionSQL.isFunction(functionName) || FunctionCustom.getFunctionId(functionName) != ID_NOT_DEFINED || (null != m_schema.findChild("ud_fun...
java
private boolean isDefinedFunctionName(String functionName) { return FunctionForVoltDB.isFunctionNameDefined(functionName) || FunctionSQL.isFunction(functionName) || FunctionCustom.getFunctionId(functionName) != ID_NOT_DEFINED || (null != m_schema.findChild("ud_fun...
[ "private", "boolean", "isDefinedFunctionName", "(", "String", "functionName", ")", "{", "return", "FunctionForVoltDB", ".", "isFunctionNameDefined", "(", "functionName", ")", "||", "FunctionSQL", ".", "isFunction", "(", "functionName", ")", "||", "FunctionCustom", "."...
Find out if the function is defined. It might be defined in the FunctionForVoltDB table. It also might be in the VoltXML. @param functionName @return
[ "Find", "out", "if", "the", "function", "is", "defined", ".", "It", "might", "be", "defined", "in", "the", "FunctionForVoltDB", "table", ".", "It", "also", "might", "be", "in", "the", "VoltXML", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/statements/CreateFunctionFromMethod.java#L86-L91
61,440
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/types/CharacterType.java
CharacterType.upper
public Object upper(Session session, Object data) { if (data == null) { return null; } if (typeCode == Types.SQL_CLOB) { String result = ((ClobData) data).getSubString(session, 0, (int) ((ClobData) data).length(session)); result = collation....
java
public Object upper(Session session, Object data) { if (data == null) { return null; } if (typeCode == Types.SQL_CLOB) { String result = ((ClobData) data).getSubString(session, 0, (int) ((ClobData) data).length(session)); result = collation....
[ "public", "Object", "upper", "(", "Session", "session", ",", "Object", "data", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "typeCode", "==", "Types", ".", "SQL_CLOB", ")", "{", "String", "result", "=", ...
Memory limits apply to Upper and Lower implementations with Clob data
[ "Memory", "limits", "apply", "to", "Upper", "and", "Lower", "implementations", "with", "Clob", "data" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/types/CharacterType.java#L794-L814
61,441
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/HistogramLogWriter.java
HistogramLogWriter.outputStartTime
public void outputStartTime(final long startTimeMsec) { log.format(Locale.US, "#[StartTime: %.3f (seconds since epoch), %s]\n", startTimeMsec / 1000.0, (new Date(startTimeMsec)).toString()); }
java
public void outputStartTime(final long startTimeMsec) { log.format(Locale.US, "#[StartTime: %.3f (seconds since epoch), %s]\n", startTimeMsec / 1000.0, (new Date(startTimeMsec)).toString()); }
[ "public", "void", "outputStartTime", "(", "final", "long", "startTimeMsec", ")", "{", "log", ".", "format", "(", "Locale", ".", "US", ",", "\"#[StartTime: %.3f (seconds since epoch), %s]\\n\"", ",", "startTimeMsec", "/", "1000.0", ",", "(", "new", "Date", "(", "...
Log a start time in the log. @param startTimeMsec time (in milliseconds) since the absolute start time (the epoch)
[ "Log", "a", "start", "time", "in", "the", "log", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/HistogramLogWriter.java#L159-L163
61,442
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientStats.java
ClientStats.latencyHistoReport
public String latencyHistoReport() { ByteArrayOutputStream baos= new ByteArrayOutputStream(); PrintStream pw = null; try { pw = new PrintStream(baos, false, Charsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { Throwables.propagate(e); } ...
java
public String latencyHistoReport() { ByteArrayOutputStream baos= new ByteArrayOutputStream(); PrintStream pw = null; try { pw = new PrintStream(baos, false, Charsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { Throwables.propagate(e); } ...
[ "public", "String", "latencyHistoReport", "(", ")", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "PrintStream", "pw", "=", "null", ";", "try", "{", "pw", "=", "new", "PrintStream", "(", "baos", ",", "false", ",", ...
Generate a human-readable report of latencies in the form of a histogram. Latency is in milliseconds @return String containing human-readable report.
[ "Generate", "a", "human", "-", "readable", "report", "of", "latencies", "in", "the", "form", "of", "a", "histogram", ".", "Latency", "is", "in", "milliseconds" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientStats.java#L499-L512
61,443
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/saverestore/TableSaveFile.java
TableSaveFile.getNextChunk
public synchronized BBContainer getNextChunk() throws IOException { if (m_chunkReaderException != null) { throw m_chunkReaderException; } if (!m_hasMoreChunks.get()) { final Container c = m_availableChunks.poll(); return c; } if (m_chunkRe...
java
public synchronized BBContainer getNextChunk() throws IOException { if (m_chunkReaderException != null) { throw m_chunkReaderException; } if (!m_hasMoreChunks.get()) { final Container c = m_availableChunks.poll(); return c; } if (m_chunkRe...
[ "public", "synchronized", "BBContainer", "getNextChunk", "(", ")", "throws", "IOException", "{", "if", "(", "m_chunkReaderException", "!=", "null", ")", "{", "throw", "m_chunkReaderException", ";", "}", "if", "(", "!", "m_hasMoreChunks", ".", "get", "(", ")", ...
Will get the next chunk of the table that is just over the chunk size
[ "Will", "get", "the", "next", "chunk", "of", "the", "table", "that", "is", "just", "over", "the", "chunk", "size" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/TableSaveFile.java#L430-L465
61,444
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCConnectionPoolDataSource.java
JDBCConnectionPoolDataSource.validateSpecifiedUserAndPassword
protected void validateSpecifiedUserAndPassword(String user, String password) throws SQLException { String configuredUser = connProperties.getProperty("user"); String configuredPassword = connProperties.getProperty("password"); if (((user == null && configuredUser != null) || (...
java
protected void validateSpecifiedUserAndPassword(String user, String password) throws SQLException { String configuredUser = connProperties.getProperty("user"); String configuredPassword = connProperties.getProperty("password"); if (((user == null && configuredUser != null) || (...
[ "protected", "void", "validateSpecifiedUserAndPassword", "(", "String", "user", ",", "String", "password", ")", "throws", "SQLException", "{", "String", "configuredUser", "=", "connProperties", ".", "getProperty", "(", "\"user\"", ")", ";", "String", "configuredPasswo...
Throws a SQLException if given user name or password are not same as those configured for this object. @throws SQLException if given user name or password is wrong.
[ "Throws", "a", "SQLException", "if", "given", "user", "name", "or", "password", "are", "not", "same", "as", "those", "configured", "for", "this", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCConnectionPoolDataSource.java#L164-L178
61,445
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCConnectionPoolDataSource.java
JDBCConnectionPoolDataSource.setConnectionProperty
public Object setConnectionProperty(String name, String value) { return connProperties.setProperty(name, value); }
java
public Object setConnectionProperty(String name, String value) { return connProperties.setProperty(name, value); }
[ "public", "Object", "setConnectionProperty", "(", "String", "name", ",", "String", "value", ")", "{", "return", "connProperties", ".", "setProperty", "(", "name", ",", "value", ")", ";", "}" ]
Sets JDBC Connection Properties to be used when physical connections are obtained for the pool.
[ "Sets", "JDBC", "Connection", "Properties", "to", "be", "used", "when", "physical", "connections", "are", "obtained", "for", "the", "pool", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCConnectionPoolDataSource.java#L230-L232
61,446
VoltDB/voltdb
src/frontend/org/voltcore/zk/MapCache.java
MapCache.start
@Override public void start(boolean block) throws InterruptedException, ExecutionException { Future<?> task = m_es.submit(new ParentEvent(null)); if (block) { task.get(); } }
java
@Override public void start(boolean block) throws InterruptedException, ExecutionException { Future<?> task = m_es.submit(new ParentEvent(null)); if (block) { task.get(); } }
[ "@", "Override", "public", "void", "start", "(", "boolean", "block", ")", "throws", "InterruptedException", ",", "ExecutionException", "{", "Future", "<", "?", ">", "task", "=", "m_es", ".", "submit", "(", "new", "ParentEvent", "(", "null", ")", ")", ";", ...
Initialize and start watching the cache.
[ "Initialize", "and", "start", "watching", "the", "cache", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/MapCache.java#L80-L86
61,447
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionAggregate.java
ExpressionAggregate.getAggregatedValue
public Object getAggregatedValue(Session session, Object currValue) { if (currValue == null) { // A VoltDB extension APPROX_COUNT_DISTINCT return opType == OpTypes.COUNT || opType == OpTypes.APPROX_COUNT_DISTINCT ? ValuePool.INTEGER_0: null; /* disable 2 ...
java
public Object getAggregatedValue(Session session, Object currValue) { if (currValue == null) { // A VoltDB extension APPROX_COUNT_DISTINCT return opType == OpTypes.COUNT || opType == OpTypes.APPROX_COUNT_DISTINCT ? ValuePool.INTEGER_0: null; /* disable 2 ...
[ "public", "Object", "getAggregatedValue", "(", "Session", "session", ",", "Object", "currValue", ")", "{", "if", "(", "currValue", "==", "null", ")", "{", "// A VoltDB extension APPROX_COUNT_DISTINCT", "return", "opType", "==", "OpTypes", ".", "COUNT", "||", "opTy...
Get the result of a SetFunction or an ordinary value @param currValue instance of set function or value @param session context @return object
[ "Get", "the", "result", "of", "a", "SetFunction", "or", "an", "ordinary", "value" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionAggregate.java#L293-L307
61,448
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.tableListIncludesReadOnlyView
private boolean tableListIncludesReadOnlyView(List<Table> tableList) { for (Table table : tableList) { if (table.getMaterializer() != null && !TableType.isStream(table.getMaterializer().getTabletype())) { return true; } } return false; }
java
private boolean tableListIncludesReadOnlyView(List<Table> tableList) { for (Table table : tableList) { if (table.getMaterializer() != null && !TableType.isStream(table.getMaterializer().getTabletype())) { return true; } } return false; }
[ "private", "boolean", "tableListIncludesReadOnlyView", "(", "List", "<", "Table", ">", "tableList", ")", "{", "for", "(", "Table", "table", ":", "tableList", ")", "{", "if", "(", "table", ".", "getMaterializer", "(", ")", "!=", "null", "&&", "!", "TableTyp...
Return true if tableList includes at least one matview.
[ "Return", "true", "if", "tableList", "includes", "at", "least", "one", "matview", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L165-L172
61,449
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.tableListIncludesExportOnly
private boolean tableListIncludesExportOnly(List<Table> tableList) { // list of all export tables (assume uppercase) NavigableSet<String> exportTables = CatalogUtil.getExportTableNames(m_catalogDb); // this loop is O(number-of-joins * number-of-export-tables) // which seems acceptable i...
java
private boolean tableListIncludesExportOnly(List<Table> tableList) { // list of all export tables (assume uppercase) NavigableSet<String> exportTables = CatalogUtil.getExportTableNames(m_catalogDb); // this loop is O(number-of-joins * number-of-export-tables) // which seems acceptable i...
[ "private", "boolean", "tableListIncludesExportOnly", "(", "List", "<", "Table", ">", "tableList", ")", "{", "// list of all export tables (assume uppercase)", "NavigableSet", "<", "String", ">", "exportTables", "=", "CatalogUtil", ".", "getExportTableNames", "(", "m_catal...
Return true if tableList includes at least one export table.
[ "Return", "true", "if", "tableList", "includes", "at", "least", "one", "export", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L177-L191
61,450
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.getBestCostPlanForEphemeralScans
private ParsedResultAccumulator getBestCostPlanForEphemeralScans(List<StmtEphemeralTableScan> scans) { int nextPlanId = m_planSelector.m_planId; boolean orderIsDeterministic = true; boolean hasSignificantOffsetOrLimit = false; String contentNonDeterminismMessage = null; for (Stmt...
java
private ParsedResultAccumulator getBestCostPlanForEphemeralScans(List<StmtEphemeralTableScan> scans) { int nextPlanId = m_planSelector.m_planId; boolean orderIsDeterministic = true; boolean hasSignificantOffsetOrLimit = false; String contentNonDeterminismMessage = null; for (Stmt...
[ "private", "ParsedResultAccumulator", "getBestCostPlanForEphemeralScans", "(", "List", "<", "StmtEphemeralTableScan", ">", "scans", ")", "{", "int", "nextPlanId", "=", "m_planSelector", ".", "m_planId", ";", "boolean", "orderIsDeterministic", "=", "true", ";", "boolean"...
Generate best cost plans for a list of derived tables, which we call FROM sub-queries and common table queries. @param subqueryNodes - list of FROM sub-queries. @return ParsedResultAccumulator
[ "Generate", "best", "cost", "plans", "for", "a", "list", "of", "derived", "tables", "which", "we", "call", "FROM", "sub", "-", "queries", "and", "common", "table", "queries", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L602-L634
61,451
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.getBestCostPlanForExpressionSubQueries
private boolean getBestCostPlanForExpressionSubQueries(Set<AbstractExpression> subqueryExprs) { int nextPlanId = m_planSelector.m_planId; for (AbstractExpression expr : subqueryExprs) { assert(expr instanceof SelectSubqueryExpression); if (!(expr instanceof SelectSubqueryExpress...
java
private boolean getBestCostPlanForExpressionSubQueries(Set<AbstractExpression> subqueryExprs) { int nextPlanId = m_planSelector.m_planId; for (AbstractExpression expr : subqueryExprs) { assert(expr instanceof SelectSubqueryExpression); if (!(expr instanceof SelectSubqueryExpress...
[ "private", "boolean", "getBestCostPlanForExpressionSubQueries", "(", "Set", "<", "AbstractExpression", ">", "subqueryExprs", ")", "{", "int", "nextPlanId", "=", "m_planSelector", ".", "m_planId", ";", "for", "(", "AbstractExpression", "expr", ":", "subqueryExprs", ")"...
Generate best cost plans for each Subquery expression from the list @param subqueryExprs - list of subquery expressions @return true if a best plan was generated for each subquery, false otherwise
[ "Generate", "best", "cost", "plans", "for", "each", "Subquery", "expression", "from", "the", "list" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L642-L672
61,452
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.getNextPlan
private CompiledPlan getNextPlan() { CompiledPlan retval; AbstractParsedStmt nextStmt = null; if (m_parsedSelect != null) { nextStmt = m_parsedSelect; retval = getNextSelectPlan(); } else if (m_parsedInsert != null) { nextStmt = m_parsedInsert; ...
java
private CompiledPlan getNextPlan() { CompiledPlan retval; AbstractParsedStmt nextStmt = null; if (m_parsedSelect != null) { nextStmt = m_parsedSelect; retval = getNextSelectPlan(); } else if (m_parsedInsert != null) { nextStmt = m_parsedInsert; ...
[ "private", "CompiledPlan", "getNextPlan", "(", ")", "{", "CompiledPlan", "retval", ";", "AbstractParsedStmt", "nextStmt", "=", "null", ";", "if", "(", "m_parsedSelect", "!=", "null", ")", "{", "nextStmt", "=", "m_parsedSelect", ";", "retval", "=", "getNextSelect...
Generate a unique and correct plan for the current SQL statement context. This method gets called repeatedly until it returns null, meaning there are no more plans. @return A not-previously returned query plan or null if no more computable plans.
[ "Generate", "a", "unique", "and", "correct", "plan", "for", "the", "current", "SQL", "statement", "context", ".", "This", "method", "gets", "called", "repeatedly", "until", "it", "returns", "null", "meaning", "there", "are", "no", "more", "plans", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L683-L721
61,453
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.connectChildrenBestPlans
private void connectChildrenBestPlans(AbstractPlanNode parentPlan) { if (parentPlan instanceof AbstractScanPlanNode) { AbstractScanPlanNode scanNode = (AbstractScanPlanNode) parentPlan; StmtTableScan tableScan = scanNode.getTableScan(); if (tableScan instanceof StmtSubquerySc...
java
private void connectChildrenBestPlans(AbstractPlanNode parentPlan) { if (parentPlan instanceof AbstractScanPlanNode) { AbstractScanPlanNode scanNode = (AbstractScanPlanNode) parentPlan; StmtTableScan tableScan = scanNode.getTableScan(); if (tableScan instanceof StmtSubquerySc...
[ "private", "void", "connectChildrenBestPlans", "(", "AbstractPlanNode", "parentPlan", ")", "{", "if", "(", "parentPlan", "instanceof", "AbstractScanPlanNode", ")", "{", "AbstractScanPlanNode", "scanNode", "=", "(", "AbstractScanPlanNode", ")", "parentPlan", ";", "StmtTa...
For each sub-query or CTE node in the plan tree, attach the corresponding plans to the parent node. @param initial plan
[ "For", "each", "sub", "-", "query", "or", "CTE", "node", "in", "the", "plan", "tree", "attach", "the", "corresponding", "plans", "to", "the", "parent", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L1013-L1050
61,454
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.needProjectionNode
private boolean needProjectionNode (AbstractPlanNode root) { if (!root.planNodeClassNeedsProjectionNode()) { return false; } // If there is a complexGroupby at his point, it means that // display columns contain all the order by columns and // does not require another...
java
private boolean needProjectionNode (AbstractPlanNode root) { if (!root.planNodeClassNeedsProjectionNode()) { return false; } // If there is a complexGroupby at his point, it means that // display columns contain all the order by columns and // does not require another...
[ "private", "boolean", "needProjectionNode", "(", "AbstractPlanNode", "root", ")", "{", "if", "(", "!", "root", ".", "planNodeClassNeedsProjectionNode", "(", ")", ")", "{", "return", "false", ";", "}", "// If there is a complexGroupby at his point, it means that", "// di...
Return true if the plan referenced by root node needs a projection node appended to the top. This method does a lot of "if this node is an instance of this class.... else if this node is an instance of this other class..." Perhaps it could be replaced by a virtual method on AbstractPlanNode? @param root The root ...
[ "Return", "true", "if", "the", "plan", "referenced", "by", "root", "node", "needs", "a", "projection", "node", "appended", "to", "the", "top", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L1263-L1285
61,455
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.deleteIsTruncate
static private boolean deleteIsTruncate(ParsedDeleteStmt stmt, AbstractPlanNode plan) { if (!(plan instanceof SeqScanPlanNode)) { return false; } // Assume all index scans have filters in this context, so only consider seq scans. SeqScanPlanNode seqScanNode = (SeqScanPlanNod...
java
static private boolean deleteIsTruncate(ParsedDeleteStmt stmt, AbstractPlanNode plan) { if (!(plan instanceof SeqScanPlanNode)) { return false; } // Assume all index scans have filters in this context, so only consider seq scans. SeqScanPlanNode seqScanNode = (SeqScanPlanNod...
[ "static", "private", "boolean", "deleteIsTruncate", "(", "ParsedDeleteStmt", "stmt", ",", "AbstractPlanNode", "plan", ")", "{", "if", "(", "!", "(", "plan", "instanceof", "SeqScanPlanNode", ")", ")", "{", "return", "false", ";", "}", "// Assume all index scans hav...
Returns true if this DELETE can be executed in the EE as a truncate operation
[ "Returns", "true", "if", "this", "DELETE", "can", "be", "executed", "in", "the", "EE", "as", "a", "truncate", "operation" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L1298-L1314
61,456
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.addCoordinatorToDMLNode
private static AbstractPlanNode addCoordinatorToDMLNode( AbstractPlanNode dmlRoot, boolean isReplicated) { dmlRoot = SubPlanAssembler.addSendReceivePair(dmlRoot); AbstractPlanNode sumOrLimitNode; if (isReplicated) { // Replicated table DML result doesn't need to be summed...
java
private static AbstractPlanNode addCoordinatorToDMLNode( AbstractPlanNode dmlRoot, boolean isReplicated) { dmlRoot = SubPlanAssembler.addSendReceivePair(dmlRoot); AbstractPlanNode sumOrLimitNode; if (isReplicated) { // Replicated table DML result doesn't need to be summed...
[ "private", "static", "AbstractPlanNode", "addCoordinatorToDMLNode", "(", "AbstractPlanNode", "dmlRoot", ",", "boolean", "isReplicated", ")", "{", "dmlRoot", "=", "SubPlanAssembler", ".", "addSendReceivePair", "(", "dmlRoot", ")", ";", "AbstractPlanNode", "sumOrLimitNode",...
Add a receive node, a sum or limit node, and a send node to the given DML node. If the DML target is a replicated table, it will add a limit node, otherwise it adds a sum node. @param dmlRoot @param isReplicated Whether or not the target table is a replicated table. @return
[ "Add", "a", "receive", "node", "a", "sum", "or", "limit", "node", "and", "a", "send", "node", "to", "the", "given", "DML", "node", ".", "If", "the", "DML", "target", "is", "a", "replicated", "table", "it", "will", "add", "a", "limit", "node", "otherw...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L1826-L1886
61,457
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.buildOrderByPlanNode
private static OrderByPlanNode buildOrderByPlanNode(List<ParsedColInfo> cols) { OrderByPlanNode n = new OrderByPlanNode(); for (ParsedColInfo col : cols) { n.addSortExpression(col.m_expression, col.m_ascending ? SortDirectionType.ASC : S...
java
private static OrderByPlanNode buildOrderByPlanNode(List<ParsedColInfo> cols) { OrderByPlanNode n = new OrderByPlanNode(); for (ParsedColInfo col : cols) { n.addSortExpression(col.m_expression, col.m_ascending ? SortDirectionType.ASC : S...
[ "private", "static", "OrderByPlanNode", "buildOrderByPlanNode", "(", "List", "<", "ParsedColInfo", ">", "cols", ")", "{", "OrderByPlanNode", "n", "=", "new", "OrderByPlanNode", "(", ")", ";", "for", "(", "ParsedColInfo", "col", ":", "cols", ")", "{", "n", "....
Given a list of ORDER BY columns, construct and return an OrderByPlanNode.
[ "Given", "a", "list", "of", "ORDER", "BY", "columns", "construct", "and", "return", "an", "OrderByPlanNode", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L1942-L1952
61,458
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.isOrderByNodeRequired
private static boolean isOrderByNodeRequired(AbstractParsedStmt parsedStmt, AbstractPlanNode root) { // Only sort when the statement has an ORDER BY. if ( ! parsedStmt.hasOrderByColumns()) { return false; } // Skip the explicit ORDER BY plan step if an IndexScan is already p...
java
private static boolean isOrderByNodeRequired(AbstractParsedStmt parsedStmt, AbstractPlanNode root) { // Only sort when the statement has an ORDER BY. if ( ! parsedStmt.hasOrderByColumns()) { return false; } // Skip the explicit ORDER BY plan step if an IndexScan is already p...
[ "private", "static", "boolean", "isOrderByNodeRequired", "(", "AbstractParsedStmt", "parsedStmt", ",", "AbstractPlanNode", "root", ")", "{", "// Only sort when the statement has an ORDER BY.", "if", "(", "!", "parsedStmt", ".", "hasOrderByColumns", "(", ")", ")", "{", "...
Determine if an OrderByPlanNode is needed. This may return false if the statement has no ORDER BY clause, or if the subtree is already producing rows in the correct order. Note that a hash aggregate node will cause this to return true, and a serial or partial aggregate node may cause this to return true. @param pars...
[ "Determine", "if", "an", "OrderByPlanNode", "is", "needed", ".", "This", "may", "return", "false", "if", "the", "statement", "has", "no", "ORDER", "BY", "clause", "or", "if", "the", "subtree", "is", "already", "producing", "rows", "in", "the", "correct", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L1965-L2102
61,459
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.handleOrderBy
private static AbstractPlanNode handleOrderBy(AbstractParsedStmt parsedStmt, AbstractPlanNode root) { assert (parsedStmt instanceof ParsedSelectStmt || parsedStmt instanceof ParsedUnionStmt || parsedStmt instanceof ParsedDeleteStmt); if (! isOrderByNodeRequired(parsedStmt, root)) { ...
java
private static AbstractPlanNode handleOrderBy(AbstractParsedStmt parsedStmt, AbstractPlanNode root) { assert (parsedStmt instanceof ParsedSelectStmt || parsedStmt instanceof ParsedUnionStmt || parsedStmt instanceof ParsedDeleteStmt); if (! isOrderByNodeRequired(parsedStmt, root)) { ...
[ "private", "static", "AbstractPlanNode", "handleOrderBy", "(", "AbstractParsedStmt", "parsedStmt", ",", "AbstractPlanNode", "root", ")", "{", "assert", "(", "parsedStmt", "instanceof", "ParsedSelectStmt", "||", "parsedStmt", "instanceof", "ParsedUnionStmt", "||", "parsedS...
Create an order by node as required by the statement and make it a parent of root. @param parsedStmt Parsed statement, for context @param root The root of the plan needing ordering @return new orderByNode (the new root) or the original root if no orderByNode was required.
[ "Create", "an", "order", "by", "node", "as", "required", "by", "the", "statement", "and", "make", "it", "a", "parent", "of", "root", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2110-L2121
61,460
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.handleSelectLimitOperator
private AbstractPlanNode handleSelectLimitOperator(AbstractPlanNode root) { // The coordinator's top limit graph fragment for a MP plan. // If planning "order by ... limit", getNextSelectPlan() // will have already added an order by to the coordinator frag. // This is the only limit ...
java
private AbstractPlanNode handleSelectLimitOperator(AbstractPlanNode root) { // The coordinator's top limit graph fragment for a MP plan. // If planning "order by ... limit", getNextSelectPlan() // will have already added an order by to the coordinator frag. // This is the only limit ...
[ "private", "AbstractPlanNode", "handleSelectLimitOperator", "(", "AbstractPlanNode", "root", ")", "{", "// The coordinator's top limit graph fragment for a MP plan.", "// If planning \"order by ... limit\", getNextSelectPlan()", "// will have already added an order by to the coordinator frag.", ...
Add a limit, pushed-down if possible, and return the new root. @param root top of the original plan @return new plan's root node
[ "Add", "a", "limit", "pushed", "-", "down", "if", "possible", "and", "return", "the", "new", "root", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2128-L2199
61,461
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.handleUnionLimitOperator
private AbstractPlanNode handleUnionLimitOperator(AbstractPlanNode root) { // The coordinator's top limit graph fragment for a MP plan. // If planning "order by ... limit", getNextUnionPlan() // will have already added an order by to the coordinator frag. // This is the only limit node i...
java
private AbstractPlanNode handleUnionLimitOperator(AbstractPlanNode root) { // The coordinator's top limit graph fragment for a MP plan. // If planning "order by ... limit", getNextUnionPlan() // will have already added an order by to the coordinator frag. // This is the only limit node i...
[ "private", "AbstractPlanNode", "handleUnionLimitOperator", "(", "AbstractPlanNode", "root", ")", "{", "// The coordinator's top limit graph fragment for a MP plan.", "// If planning \"order by ... limit\", getNextUnionPlan()", "// will have already added an order by to the coordinator frag.", ...
Add a limit, and return the new root. @param root top of the original plan @return new plan's root node
[ "Add", "a", "limit", "and", "return", "the", "new", "root", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2206-L2214
61,462
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.inlineLimitOperator
private AbstractPlanNode inlineLimitOperator(AbstractPlanNode root, LimitPlanNode topLimit) { if (isInlineLimitPlanNodePossible(root)) { root.addInlinePlanNode(topLimit); } else if (root instanceof ProjectionPlanNode && isInlineLimitPlanNodePossible(root.g...
java
private AbstractPlanNode inlineLimitOperator(AbstractPlanNode root, LimitPlanNode topLimit) { if (isInlineLimitPlanNodePossible(root)) { root.addInlinePlanNode(topLimit); } else if (root instanceof ProjectionPlanNode && isInlineLimitPlanNodePossible(root.g...
[ "private", "AbstractPlanNode", "inlineLimitOperator", "(", "AbstractPlanNode", "root", ",", "LimitPlanNode", "topLimit", ")", "{", "if", "(", "isInlineLimitPlanNodePossible", "(", "root", ")", ")", "{", "root", ".", "addInlinePlanNode", "(", "topLimit", ")", ";", ...
Inline Limit plan node if possible @param root @param topLimit @return
[ "Inline", "Limit", "plan", "node", "if", "possible" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2222-L2238
61,463
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.isInlineLimitPlanNodePossible
static private boolean isInlineLimitPlanNodePossible(AbstractPlanNode pn) { if (pn instanceof OrderByPlanNode || pn.getPlanNodeType() == PlanNodeType.AGGREGATE) { return true; } return false; }
java
static private boolean isInlineLimitPlanNodePossible(AbstractPlanNode pn) { if (pn instanceof OrderByPlanNode || pn.getPlanNodeType() == PlanNodeType.AGGREGATE) { return true; } return false; }
[ "static", "private", "boolean", "isInlineLimitPlanNodePossible", "(", "AbstractPlanNode", "pn", ")", "{", "if", "(", "pn", "instanceof", "OrderByPlanNode", "||", "pn", ".", "getPlanNodeType", "(", ")", "==", "PlanNodeType", ".", "AGGREGATE", ")", "{", "return", ...
Inline limit plan node can be applied with ORDER BY node and serial aggregation node @param pn @return
[ "Inline", "limit", "plan", "node", "can", "be", "applied", "with", "ORDER", "BY", "node", "and", "serial", "aggregation", "node" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2246-L2252
61,464
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.switchToIndexScanForGroupBy
private boolean switchToIndexScanForGroupBy(AbstractPlanNode candidate, IndexGroupByInfo gbInfo) { if (! m_parsedSelect.isGrouped()) { return false; } if (candidate instanceof IndexScanPlanNode) { calculateIndexGroupByInfo((IndexScanPlanNode) candidate, gbInf...
java
private boolean switchToIndexScanForGroupBy(AbstractPlanNode candidate, IndexGroupByInfo gbInfo) { if (! m_parsedSelect.isGrouped()) { return false; } if (candidate instanceof IndexScanPlanNode) { calculateIndexGroupByInfo((IndexScanPlanNode) candidate, gbInf...
[ "private", "boolean", "switchToIndexScanForGroupBy", "(", "AbstractPlanNode", "candidate", ",", "IndexGroupByInfo", "gbInfo", ")", "{", "if", "(", "!", "m_parsedSelect", ".", "isGrouped", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "candidate", ...
For a seqscan feeding a GROUP BY, consider substituting an IndexScan that pre-sorts by the GROUP BY keys. If a candidate is already an indexscan, simply calculate GROUP BY column coverage @param candidate @param gbInfo @return true when planner can switch to index scan from a sequential scan, and when the index scan h...
[ "For", "a", "seqscan", "feeding", "a", "GROUP", "BY", "consider", "substituting", "an", "IndexScan", "that", "pre", "-", "sorts", "by", "the", "GROUP", "BY", "keys", ".", "If", "a", "candidate", "is", "already", "an", "indexscan", "simply", "calculate", "G...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2419-L2468
61,465
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.handleWindowedOperators
private AbstractPlanNode handleWindowedOperators(AbstractPlanNode root) { // Get the windowed expression. We need to set its output // schema from the display list. WindowFunctionExpression winExpr = m_parsedSelect.getWindowFunctionExpressions().get(0); assert(winExpr != null); ...
java
private AbstractPlanNode handleWindowedOperators(AbstractPlanNode root) { // Get the windowed expression. We need to set its output // schema from the display list. WindowFunctionExpression winExpr = m_parsedSelect.getWindowFunctionExpressions().get(0); assert(winExpr != null); ...
[ "private", "AbstractPlanNode", "handleWindowedOperators", "(", "AbstractPlanNode", "root", ")", "{", "// Get the windowed expression. We need to set its output", "// schema from the display list.", "WindowFunctionExpression", "winExpr", "=", "m_parsedSelect", ".", "getWindowFunctionEx...
Create nodes for windowed operations. @param root @return
[ "Create", "nodes", "for", "windowed", "operations", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2476-L2568
61,466
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.updatePartialIndex
private static void updatePartialIndex(IndexScanPlanNode scan) { if (scan.getPredicate() == null && scan.getPartialIndexPredicate() != null) { if (scan.isForSortOrderOnly()) { scan.setPredicate(Collections.singletonList(scan.getPartialIndexPredicate())); } sca...
java
private static void updatePartialIndex(IndexScanPlanNode scan) { if (scan.getPredicate() == null && scan.getPartialIndexPredicate() != null) { if (scan.isForSortOrderOnly()) { scan.setPredicate(Collections.singletonList(scan.getPartialIndexPredicate())); } sca...
[ "private", "static", "void", "updatePartialIndex", "(", "IndexScanPlanNode", "scan", ")", "{", "if", "(", "scan", ".", "getPredicate", "(", ")", "==", "null", "&&", "scan", ".", "getPartialIndexPredicate", "(", ")", "!=", "null", ")", "{", "if", "(", "scan...
Check if the index for the scan node is a partial index, and if so, make sure that the scan contains index predicate, and update index reason as needed for @Explain. @param scan index scan plan node
[ "Check", "if", "the", "index", "for", "the", "scan", "node", "is", "a", "partial", "index", "and", "if", "so", "make", "sure", "that", "the", "scan", "contains", "index", "predicate", "and", "update", "index", "reason", "as", "needed", "for" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2594-L2601
61,467
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.calculateIndexGroupByInfo
private void calculateIndexGroupByInfo(IndexScanPlanNode root, IndexGroupByInfo gbInfo) { String fromTableAlias = root.getTargetTableAlias(); assert(fromTableAlias != null); Index index = root.getCatalogIndex(); if ( ! IndexType.isScannable(index.getType())) { re...
java
private void calculateIndexGroupByInfo(IndexScanPlanNode root, IndexGroupByInfo gbInfo) { String fromTableAlias = root.getTargetTableAlias(); assert(fromTableAlias != null); Index index = root.getCatalogIndex(); if ( ! IndexType.isScannable(index.getType())) { re...
[ "private", "void", "calculateIndexGroupByInfo", "(", "IndexScanPlanNode", "root", ",", "IndexGroupByInfo", "gbInfo", ")", "{", "String", "fromTableAlias", "=", "root", ".", "getTargetTableAlias", "(", ")", ";", "assert", "(", "fromTableAlias", "!=", "null", ")", "...
Sets IndexGroupByInfo for an IndexScan
[ "Sets", "IndexGroupByInfo", "for", "an", "IndexScan" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2836-L2852
61,468
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.indexAccessForGroupByExprs
private AbstractPlanNode indexAccessForGroupByExprs(SeqScanPlanNode root, IndexGroupByInfo gbInfo) { if (! root.isPersistentTableScan()) { // subquery and common tables are not handled return root; } String fromTableAlias = root.getTargetTableAlias(); ...
java
private AbstractPlanNode indexAccessForGroupByExprs(SeqScanPlanNode root, IndexGroupByInfo gbInfo) { if (! root.isPersistentTableScan()) { // subquery and common tables are not handled return root; } String fromTableAlias = root.getTargetTableAlias(); ...
[ "private", "AbstractPlanNode", "indexAccessForGroupByExprs", "(", "SeqScanPlanNode", "root", ",", "IndexGroupByInfo", "gbInfo", ")", "{", "if", "(", "!", "root", ".", "isPersistentTableScan", "(", ")", ")", "{", "// subquery and common tables are not handled", "return", ...
Turn sequential scan to index scan for group by if possible
[ "Turn", "sequential", "scan", "to", "index", "scan", "for", "group", "by", "if", "possible" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L2855-L2912
61,469
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.fixDistributedApproxCountDistinct
private static void fixDistributedApproxCountDistinct( AggregatePlanNode distNode, AggregatePlanNode coordNode) { assert (distNode != null); assert (coordNode != null); // Patch up any APPROX_COUNT_DISTINCT on the distributed node. List<ExpressionType> distAggTy...
java
private static void fixDistributedApproxCountDistinct( AggregatePlanNode distNode, AggregatePlanNode coordNode) { assert (distNode != null); assert (coordNode != null); // Patch up any APPROX_COUNT_DISTINCT on the distributed node. List<ExpressionType> distAggTy...
[ "private", "static", "void", "fixDistributedApproxCountDistinct", "(", "AggregatePlanNode", "distNode", ",", "AggregatePlanNode", "coordNode", ")", "{", "assert", "(", "distNode", "!=", "null", ")", ";", "assert", "(", "coordNode", "!=", "null", ")", ";", "// Patc...
This function is called once it's been determined that we can push down an aggregation plan node. If an APPROX_COUNT_DISTINCT aggregate is distributed, then we need to convert the distributed aggregate function to VALS_TO_HYPERLOGLOG, and the coordinating aggregate function to HYPERLOGLOGS_TO_CARD. @param distNode ...
[ "This", "function", "is", "called", "once", "it", "s", "been", "determined", "that", "we", "can", "push", "down", "an", "aggregation", "plan", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L3004-L3032
61,470
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.checkLimitPushDownViability
protected AbstractPlanNode checkLimitPushDownViability( AbstractPlanNode root) { AbstractPlanNode receiveNode = root; List<ParsedColInfo> orderBys = m_parsedSelect.orderByColumns(); boolean orderByCoversAllGroupBy = m_parsedSelect.groupByIsAnOrderByPermutation(); while ( ! (...
java
protected AbstractPlanNode checkLimitPushDownViability( AbstractPlanNode root) { AbstractPlanNode receiveNode = root; List<ParsedColInfo> orderBys = m_parsedSelect.orderByColumns(); boolean orderByCoversAllGroupBy = m_parsedSelect.groupByIsAnOrderByPermutation(); while ( ! (...
[ "protected", "AbstractPlanNode", "checkLimitPushDownViability", "(", "AbstractPlanNode", "root", ")", "{", "AbstractPlanNode", "receiveNode", "=", "root", ";", "List", "<", "ParsedColInfo", ">", "orderBys", "=", "m_parsedSelect", ".", "orderByColumns", "(", ")", ";", ...
Check if we can push the limit node down. Return a mid-plan send node, if one exists and can host a distributed limit node. There is guaranteed to be at most a single receive/send pair. Abort the search if a node that a "limit" can't be pushed past is found before its receive node. Can only push past: * coordinatingA...
[ "Check", "if", "we", "can", "push", "the", "limit", "node", "down", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L3166-L3204
61,471
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.getIndexedColumnSetForTable
private static Set<String> getIndexedColumnSetForTable(Table table) { HashSet<String> columns = new HashSet<>(); for (Index index : table.getIndexes()) { for (ColumnRef colRef : index.getColumns()) { columns.add(colRef.getColumn().getTypeName()); } } ...
java
private static Set<String> getIndexedColumnSetForTable(Table table) { HashSet<String> columns = new HashSet<>(); for (Index index : table.getIndexes()) { for (ColumnRef colRef : index.getColumns()) { columns.add(colRef.getColumn().getTypeName()); } } ...
[ "private", "static", "Set", "<", "String", ">", "getIndexedColumnSetForTable", "(", "Table", "table", ")", "{", "HashSet", "<", "String", ">", "columns", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "Index", "index", ":", "table", ".", "getInd...
Get the unique set of names of all columns that are part of an index on the given table. @param table The table to build the list of index-affected columns with. @return The set of column names affected by indexes with duplicates removed.
[ "Get", "the", "unique", "set", "of", "names", "of", "all", "columns", "that", "are", "part", "of", "an", "index", "on", "the", "given", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L3343-L3353
61,472
VoltDB/voltdb
src/frontend/org/voltdb/planner/PlanAssembler.java
PlanAssembler.isNullRejecting
private static boolean isNullRejecting(Collection<String> tableAliases, List<AbstractExpression> exprs) { for (AbstractExpression expr : exprs) { for (String tableAlias : tableAliases) { if (ExpressionUtil.isNullRejectingExpression(expr, tableAlias)) { ...
java
private static boolean isNullRejecting(Collection<String> tableAliases, List<AbstractExpression> exprs) { for (AbstractExpression expr : exprs) { for (String tableAlias : tableAliases) { if (ExpressionUtil.isNullRejectingExpression(expr, tableAlias)) { ...
[ "private", "static", "boolean", "isNullRejecting", "(", "Collection", "<", "String", ">", "tableAliases", ",", "List", "<", "AbstractExpression", ">", "exprs", ")", "{", "for", "(", "AbstractExpression", "expr", ":", "exprs", ")", "{", "for", "(", "String", ...
Verify if an expression from the input list is NULL-rejecting for any of the tables from the list @param tableAliases list of tables @param exprs list of expressions @return TRUE if there is a NULL-rejecting expression
[ "Verify", "if", "an", "expression", "from", "the", "input", "list", "is", "NULL", "-", "rejecting", "for", "any", "of", "the", "tables", "from", "the", "list" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanAssembler.java#L3490-L3501
61,473
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.determineIndexOrdering
private int determineIndexOrdering(StmtTableScan tableScan, int keyComponentCount, List<AbstractExpression> indexedExprs, List<ColumnRef> indexedColRefs, AccessPath retval, int[] orderSpoilers, List<AbstractExpression> bindingsForOrder) { ...
java
private int determineIndexOrdering(StmtTableScan tableScan, int keyComponentCount, List<AbstractExpression> indexedExprs, List<ColumnRef> indexedColRefs, AccessPath retval, int[] orderSpoilers, List<AbstractExpression> bindingsForOrder) { ...
[ "private", "int", "determineIndexOrdering", "(", "StmtTableScan", "tableScan", ",", "int", "keyComponentCount", ",", "List", "<", "AbstractExpression", ">", "indexedExprs", ",", "List", "<", "ColumnRef", ">", "indexedColRefs", ",", "AccessPath", "retval", ",", "int"...
Determine if an index, which is in the AccessPath argument retval, can satisfy a parsed select statement's order by or window function ordering requirements. @param table only used here to validate base table names of ORDER BY columns' . @param bindingsForOrder restrictions on parameter settings that ar...
[ "Determine", "if", "an", "index", "which", "is", "in", "the", "AccessPath", "argument", "retval", "can", "satisfy", "a", "parsed", "select", "statement", "s", "order", "by", "or", "window", "function", "ordering", "requirements", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L1619-L1719
61,474
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.findBindingsForOneIndexedExpression
private static List<AbstractExpression> findBindingsForOneIndexedExpression(ExpressionOrColumn nextStatementEOC, ExpressionOrColumn indexEntry) { assert(nextStatementEOC.m_expr != null); AbstractExpression nextStatementExpr = nextStatementEOC.m_expr; ...
java
private static List<AbstractExpression> findBindingsForOneIndexedExpression(ExpressionOrColumn nextStatementEOC, ExpressionOrColumn indexEntry) { assert(nextStatementEOC.m_expr != null); AbstractExpression nextStatementExpr = nextStatementEOC.m_expr; ...
[ "private", "static", "List", "<", "AbstractExpression", ">", "findBindingsForOneIndexedExpression", "(", "ExpressionOrColumn", "nextStatementEOC", ",", "ExpressionOrColumn", "indexEntry", ")", "{", "assert", "(", "nextStatementEOC", ".", "m_expr", "!=", "null", ")", ";"...
Match the indexEntry, which is from an index, with a statement expression or column. The nextStatementEOC must be an expression, not a column reference. @param nextStatementEOC The expression or column in the SQL statement. @param indexEntry The expression or column in the index. @return A list of bindings for this m...
[ "Match", "the", "indexEntry", "which", "is", "from", "an", "index", "with", "a", "statement", "expression", "or", "column", ".", "The", "nextStatementEOC", "must", "be", "an", "expression", "not", "a", "column", "reference", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L1733-L1754
61,475
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.removeExactMatchCoveredExpressions
private static boolean removeExactMatchCoveredExpressions( AbstractExpression coveringExpr, List<AbstractExpression> exprsToCover) { boolean hasMatch = false; Iterator<AbstractExpression> iter = exprsToCover.iterator(); while(iter.hasNext()) { AbstractExpression exprToCo...
java
private static boolean removeExactMatchCoveredExpressions( AbstractExpression coveringExpr, List<AbstractExpression> exprsToCover) { boolean hasMatch = false; Iterator<AbstractExpression> iter = exprsToCover.iterator(); while(iter.hasNext()) { AbstractExpression exprToCo...
[ "private", "static", "boolean", "removeExactMatchCoveredExpressions", "(", "AbstractExpression", "coveringExpr", ",", "List", "<", "AbstractExpression", ">", "exprsToCover", ")", "{", "boolean", "hasMatch", "=", "false", ";", "Iterator", "<", "AbstractExpression", ">", ...
Loop over the expressions to cover to find ones that exactly match the covering expression and remove them from the original list. Returns true if there is at least one match. False otherwise. @param coveringExpr @param exprsToCover @return true is the covering expression exactly matches to one or more expressions to c...
[ "Loop", "over", "the", "expressions", "to", "cover", "to", "find", "ones", "that", "exactly", "match", "the", "covering", "expression", "and", "remove", "them", "from", "the", "original", "list", ".", "Returns", "true", "if", "there", "is", "at", "least", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2020-L2034
61,476
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.removeNotNullCoveredExpressions
private static List<AbstractExpression> removeNotNullCoveredExpressions(StmtTableScan tableScan, List<AbstractExpression> coveringExprs, List<AbstractExpression> exprsToCover) { // Collect all TVEs from NULL-rejecting covering expressions Set<TupleValueExpression> coveringTves = new HashSet<>(); ...
java
private static List<AbstractExpression> removeNotNullCoveredExpressions(StmtTableScan tableScan, List<AbstractExpression> coveringExprs, List<AbstractExpression> exprsToCover) { // Collect all TVEs from NULL-rejecting covering expressions Set<TupleValueExpression> coveringTves = new HashSet<>(); ...
[ "private", "static", "List", "<", "AbstractExpression", ">", "removeNotNullCoveredExpressions", "(", "StmtTableScan", "tableScan", ",", "List", "<", "AbstractExpression", ">", "coveringExprs", ",", "List", "<", "AbstractExpression", ">", "exprsToCover", ")", "{", "// ...
Remove NOT NULL expressions that are covered by the NULL-rejecting expressions. For example, 'COL IS NOT NULL' is covered by the 'COL > 0' NULL-rejecting comparison expression. @param tableScan @param coveringExprs @param exprsToCover @return List<AbstractExpression>
[ "Remove", "NOT", "NULL", "expressions", "that", "are", "covered", "by", "the", "NULL", "-", "rejecting", "expressions", ".", "For", "example", "COL", "IS", "NOT", "NULL", "is", "covered", "by", "the", "COL", ">", "0", "NULL", "-", "rejecting", "comparison"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2045-L2070
61,477
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.addSendReceivePair
protected static AbstractPlanNode addSendReceivePair(AbstractPlanNode scanNode) { SendPlanNode sendNode = new SendPlanNode(); sendNode.addAndLinkChild(scanNode); ReceivePlanNode recvNode = new ReceivePlanNode(); recvNode.addAndLinkChild(sendNode); return recvNode; }
java
protected static AbstractPlanNode addSendReceivePair(AbstractPlanNode scanNode) { SendPlanNode sendNode = new SendPlanNode(); sendNode.addAndLinkChild(scanNode); ReceivePlanNode recvNode = new ReceivePlanNode(); recvNode.addAndLinkChild(sendNode); return recvNode; }
[ "protected", "static", "AbstractPlanNode", "addSendReceivePair", "(", "AbstractPlanNode", "scanNode", ")", "{", "SendPlanNode", "sendNode", "=", "new", "SendPlanNode", "(", ")", ";", "sendNode", ".", "addAndLinkChild", "(", "scanNode", ")", ";", "ReceivePlanNode", "...
Insert a send receive pair above the supplied scanNode. @param scanNode that needs to be distributed @return return the newly created receive node (which is linked to the new sends)
[ "Insert", "a", "send", "receive", "pair", "above", "the", "supplied", "scanNode", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2133-L2141
61,478
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.getAccessPlanForTable
protected static AbstractPlanNode getAccessPlanForTable(JoinNode tableNode) { StmtTableScan tableScan = tableNode.getTableScan(); // Access path to access the data in the table (index/scan/etc). AccessPath path = tableNode.m_currentAccessPath; assert(path != null); // if no inde...
java
protected static AbstractPlanNode getAccessPlanForTable(JoinNode tableNode) { StmtTableScan tableScan = tableNode.getTableScan(); // Access path to access the data in the table (index/scan/etc). AccessPath path = tableNode.m_currentAccessPath; assert(path != null); // if no inde...
[ "protected", "static", "AbstractPlanNode", "getAccessPlanForTable", "(", "JoinNode", "tableNode", ")", "{", "StmtTableScan", "tableScan", "=", "tableNode", ".", "getTableScan", "(", ")", ";", "// Access path to access the data in the table (index/scan/etc).", "AccessPath", "p...
Given an access path, build the single-site or distributed plan that will assess the data from the table according to the path. @param table The table to get data from. @return The root of a plan graph to get the data.
[ "Given", "an", "access", "path", "build", "the", "single", "-", "site", "or", "distributed", "plan", "that", "will", "assess", "the", "data", "from", "the", "table", "according", "to", "the", "path", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2150-L2161
61,479
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.getIndexAccessPlanForTable
private static AbstractPlanNode getIndexAccessPlanForTable( StmtTableScan tableScan, AccessPath path) { // now assume this will be an index scan and get the relevant index Index index = path.index; IndexScanPlanNode scanNode = new IndexScanPlanNode(tableScan, index); Abstract...
java
private static AbstractPlanNode getIndexAccessPlanForTable( StmtTableScan tableScan, AccessPath path) { // now assume this will be an index scan and get the relevant index Index index = path.index; IndexScanPlanNode scanNode = new IndexScanPlanNode(tableScan, index); Abstract...
[ "private", "static", "AbstractPlanNode", "getIndexAccessPlanForTable", "(", "StmtTableScan", "tableScan", ",", "AccessPath", "path", ")", "{", "// now assume this will be an index scan and get the relevant index", "Index", "index", "=", "path", ".", "index", ";", "IndexScanPl...
Get an index scan access plan for a table. @param tableAliasIndex The table to get data from. @param path The access path to access the data in the table (index/scan/etc). @return An index scan plan node OR, in one edge case, an NLIJ of a MaterializedScan and an index scan plan node.
[ "Get", "an", "index", "scan", "access", "plan", "for", "a", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2189-L2261
61,480
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.injectIndexedJoinWithMaterializedScan
private static AbstractPlanNode injectIndexedJoinWithMaterializedScan( AbstractExpression listElements, IndexScanPlanNode scanNode) { MaterializedScanPlanNode matScan = new MaterializedScanPlanNode(); assert(listElements instanceof VectorValueExpression || listElements instanceof ParameterVa...
java
private static AbstractPlanNode injectIndexedJoinWithMaterializedScan( AbstractExpression listElements, IndexScanPlanNode scanNode) { MaterializedScanPlanNode matScan = new MaterializedScanPlanNode(); assert(listElements instanceof VectorValueExpression || listElements instanceof ParameterVa...
[ "private", "static", "AbstractPlanNode", "injectIndexedJoinWithMaterializedScan", "(", "AbstractExpression", "listElements", ",", "IndexScanPlanNode", "scanNode", ")", "{", "MaterializedScanPlanNode", "matScan", "=", "new", "MaterializedScanPlanNode", "(", ")", ";", "assert",...
Generate a plan for an IN-LIST-driven index scan
[ "Generate", "a", "plan", "for", "an", "IN", "-", "LIST", "-", "driven", "index", "scan" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2265-L2279
61,481
VoltDB/voltdb
src/frontend/org/voltdb/planner/SubPlanAssembler.java
SubPlanAssembler.replaceInListFilterWithEqualityFilter
private static void replaceInListFilterWithEqualityFilter(List<AbstractExpression> endExprs, AbstractExpression inListRhs, AbstractExpression equalityRhs) { for (AbstractExpression comparator : endE...
java
private static void replaceInListFilterWithEqualityFilter(List<AbstractExpression> endExprs, AbstractExpression inListRhs, AbstractExpression equalityRhs) { for (AbstractExpression comparator : endE...
[ "private", "static", "void", "replaceInListFilterWithEqualityFilter", "(", "List", "<", "AbstractExpression", ">", "endExprs", ",", "AbstractExpression", "inListRhs", ",", "AbstractExpression", "equalityRhs", ")", "{", "for", "(", "AbstractExpression", "comparator", ":", ...
with an equality filter referencing the second given rhs.
[ "with", "an", "equality", "filter", "referencing", "the", "second", "given", "rhs", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2284-L2300
61,482
VoltDB/voltdb
examples/callcenter/client/callcenter/CallSimulator.java
CallSimulator.makeRandomEvent
CallEvent[] makeRandomEvent() { long callId = ++lastCallIdUsed; // get agentid Integer agentId = agentsAvailable.poll(); if (agentId == null) { return null; } // get phone number Long phoneNo = phoneNumbersAvailable.poll(); assert(phoneNo != ...
java
CallEvent[] makeRandomEvent() { long callId = ++lastCallIdUsed; // get agentid Integer agentId = agentsAvailable.poll(); if (agentId == null) { return null; } // get phone number Long phoneNo = phoneNumbersAvailable.poll(); assert(phoneNo != ...
[ "CallEvent", "[", "]", "makeRandomEvent", "(", ")", "{", "long", "callId", "=", "++", "lastCallIdUsed", ";", "// get agentid", "Integer", "agentId", "=", "agentsAvailable", ".", "poll", "(", ")", ";", "if", "(", "agentId", "==", "null", ")", "{", "return",...
Generate a random call event with a duration. Reserves agent and phone number from the pool.
[ "Generate", "a", "random", "call", "event", "with", "a", "duration", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/CallSimulator.java#L86-L123
61,483
VoltDB/voltdb
examples/callcenter/client/callcenter/CallSimulator.java
CallSimulator.next
@Override public CallEvent next(long systemCurrentTimeMillis) { // check for time passing if (systemCurrentTimeMillis > currentSystemMilliTimestamp) { // build a target for this 1ms window long eventBacklog = targetEventsThisMillisecond - eventsSoFarThisMillisecond; ...
java
@Override public CallEvent next(long systemCurrentTimeMillis) { // check for time passing if (systemCurrentTimeMillis > currentSystemMilliTimestamp) { // build a target for this 1ms window long eventBacklog = targetEventsThisMillisecond - eventsSoFarThisMillisecond; ...
[ "@", "Override", "public", "CallEvent", "next", "(", "long", "systemCurrentTimeMillis", ")", "{", "// check for time passing", "if", "(", "systemCurrentTimeMillis", ">", "currentSystemMilliTimestamp", ")", "{", "// build a target for this 1ms window", "long", "eventBacklog", ...
Return the next call event that is safe for delivery or null if there are no safe objects to deliver. Null response could mean empty, or could mean all objects are scheduled for the future. @param systemCurrentTimeMillis The current time. @return CallEvent
[ "Return", "the", "next", "call", "event", "that", "is", "safe", "for", "delivery", "or", "null", "if", "there", "are", "no", "safe", "objects", "to", "deliver", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/CallSimulator.java#L135-L188
61,484
VoltDB/voltdb
examples/callcenter/client/callcenter/CallSimulator.java
CallSimulator.validate
private void validate() { long delayedEventCount = delayedEvents.size(); long outstandingAgents = config.agents - agentsAvailable.size(); long outstandingPhones = config.numbers - phoneNumbersAvailable.size(); if (outstandingAgents != outstandingPhones) { throw new RuntimeE...
java
private void validate() { long delayedEventCount = delayedEvents.size(); long outstandingAgents = config.agents - agentsAvailable.size(); long outstandingPhones = config.numbers - phoneNumbersAvailable.size(); if (outstandingAgents != outstandingPhones) { throw new RuntimeE...
[ "private", "void", "validate", "(", ")", "{", "long", "delayedEventCount", "=", "delayedEvents", ".", "size", "(", ")", ";", "long", "outstandingAgents", "=", "config", ".", "agents", "-", "agentsAvailable", ".", "size", "(", ")", ";", "long", "outstandingPh...
Smoke check on validity of data structures. This was useful while getting the code right for this class, but it doesn't do much now, unless the code needs changes.
[ "Smoke", "check", "on", "validity", "of", "data", "structures", ".", "This", "was", "useful", "while", "getting", "the", "code", "right", "for", "this", "class", "but", "it", "doesn", "t", "do", "much", "now", "unless", "the", "code", "needs", "changes", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/CallSimulator.java#L219-L235
61,485
VoltDB/voltdb
examples/callcenter/client/callcenter/CallSimulator.java
CallSimulator.printSummary
void printSummary() { System.out.printf("There are %d agents outstanding and %d phones. %d entries waiting to go.\n", agentsAvailable.size(), phoneNumbersAvailable.size(), delayedEvents.size()); }
java
void printSummary() { System.out.printf("There are %d agents outstanding and %d phones. %d entries waiting to go.\n", agentsAvailable.size(), phoneNumbersAvailable.size(), delayedEvents.size()); }
[ "void", "printSummary", "(", ")", "{", "System", ".", "out", ".", "printf", "(", "\"There are %d agents outstanding and %d phones. %d entries waiting to go.\\n\"", ",", "agentsAvailable", ".", "size", "(", ")", ",", "phoneNumbersAvailable", ".", "size", "(", ")", ",",...
Debug statement to help users verify there are no lost or delayed events.
[ "Debug", "statement", "to", "help", "users", "verify", "there", "are", "no", "lost", "or", "delayed", "events", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/CallSimulator.java#L240-L243
61,486
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java
DefaultParser.isNegativeNumber
private boolean isNegativeNumber(String token) { try { Double.parseDouble(token); return true; } catch (NumberFormatException e) { return false; } }
java
private boolean isNegativeNumber(String token) { try { Double.parseDouble(token); return true; } catch (NumberFormatException e) { return false; } }
[ "private", "boolean", "isNegativeNumber", "(", "String", "token", ")", "{", "try", "{", "Double", ".", "parseDouble", "(", "token", ")", ";", "return", "true", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "return", "false", ";", "}", "...
Check if the token is a negative number. @param token
[ "Check", "if", "the", "token", "is", "a", "negative", "number", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java#L271-L282
61,487
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java
DefaultParser.isLongOption
private boolean isLongOption(String token) { if (!token.startsWith("-") || token.length() == 1) { return false; } int pos = token.indexOf("="); String t = pos == -1 ? token : token.substring(0, pos); if (!options.getMatchingOptions(t).isEmpty()) ...
java
private boolean isLongOption(String token) { if (!token.startsWith("-") || token.length() == 1) { return false; } int pos = token.indexOf("="); String t = pos == -1 ? token : token.substring(0, pos); if (!options.getMatchingOptions(t).isEmpty()) ...
[ "private", "boolean", "isLongOption", "(", "String", "token", ")", "{", "if", "(", "!", "token", ".", "startsWith", "(", "\"-\"", ")", "||", "token", ".", "length", "(", ")", "==", "1", ")", "{", "return", "false", ";", "}", "int", "pos", "=", "tok...
Tells if the token looks like a long option. @param token
[ "Tells", "if", "the", "token", "looks", "like", "a", "long", "option", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java#L310-L332
61,488
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java
DefaultParser.handleUnknownToken
private void handleUnknownToken(String token) throws ParseException { if (token.startsWith("-") && token.length() > 1 && !stopAtNonOption) { throw new UnrecognizedOptionException("Unrecognized option: " + token, token); } cmd.addArg(token); if (stopAtNonOption) ...
java
private void handleUnknownToken(String token) throws ParseException { if (token.startsWith("-") && token.length() > 1 && !stopAtNonOption) { throw new UnrecognizedOptionException("Unrecognized option: " + token, token); } cmd.addArg(token); if (stopAtNonOption) ...
[ "private", "void", "handleUnknownToken", "(", "String", "token", ")", "throws", "ParseException", "{", "if", "(", "token", ".", "startsWith", "(", "\"-\"", ")", "&&", "token", ".", "length", "(", ")", ">", "1", "&&", "!", "stopAtNonOption", ")", "{", "th...
Handles an unknown token. If the token starts with a dash an UnrecognizedOptionException is thrown. Otherwise the token is added to the arguments of the command line. If the stopAtNonOption flag is set, this stops the parsing and the remaining tokens are added as-is in the arguments of the command line. @param token t...
[ "Handles", "an", "unknown", "token", ".", "If", "the", "token", "starts", "with", "a", "dash", "an", "UnrecognizedOptionException", "is", "thrown", ".", "Otherwise", "the", "token", "is", "added", "to", "the", "arguments", "of", "the", "command", "line", "."...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java#L343-L355
61,489
VoltDB/voltdb
src/frontend/org/voltdb/SQLStmt.java
SQLStmt.getText
public String getText() { if (sqlTextStr == null) { sqlTextStr = new String(sqlText, Constants.UTF8ENCODING); } return sqlTextStr; }
java
public String getText() { if (sqlTextStr == null) { sqlTextStr = new String(sqlText, Constants.UTF8ENCODING); } return sqlTextStr; }
[ "public", "String", "getText", "(", ")", "{", "if", "(", "sqlTextStr", "==", "null", ")", "{", "sqlTextStr", "=", "new", "String", "(", "sqlText", ",", "Constants", ".", "UTF8ENCODING", ")", ";", "}", "return", "sqlTextStr", ";", "}" ]
Get the text of the SQL statement represented. @return String containing the text of the SQL statement represented.
[ "Get", "the", "text", "of", "the", "SQL", "statement", "represented", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SQLStmt.java#L201-L206
61,490
VoltDB/voltdb
src/frontend/org/voltdb/SQLStmt.java
SQLStmt.canonicalizeStmt
public static String canonicalizeStmt(String stmtStr) { // Cleanup whitespace newlines and adding semicolon for catalog compatibility stmtStr = stmtStr.replaceAll("\n", " "); stmtStr = stmtStr.trim(); if (!stmtStr.endsWith(";")) { stmtStr += ";"; } return stm...
java
public static String canonicalizeStmt(String stmtStr) { // Cleanup whitespace newlines and adding semicolon for catalog compatibility stmtStr = stmtStr.replaceAll("\n", " "); stmtStr = stmtStr.trim(); if (!stmtStr.endsWith(";")) { stmtStr += ";"; } return stm...
[ "public", "static", "String", "canonicalizeStmt", "(", "String", "stmtStr", ")", "{", "// Cleanup whitespace newlines and adding semicolon for catalog compatibility", "stmtStr", "=", "stmtStr", ".", "replaceAll", "(", "\"\\n\"", ",", "\" \"", ")", ";", "stmtStr", "=", "...
use the same statement to compute crc.
[ "use", "the", "same", "statement", "to", "compute", "crc", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SQLStmt.java#L229-L238
61,491
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/net/PercentEscaper.java
PercentEscaper.createSafeOctets
private static boolean[] createSafeOctets(String safeChars) { int maxChar = -1; char[] safeCharArray = safeChars.toCharArray(); for (char c : safeCharArray) { maxChar = Math.max(c, maxChar); } boolean[] octets = new boolean[maxChar + 1]; for (char c : safeCharArray) { octets[c] = tru...
java
private static boolean[] createSafeOctets(String safeChars) { int maxChar = -1; char[] safeCharArray = safeChars.toCharArray(); for (char c : safeCharArray) { maxChar = Math.max(c, maxChar); } boolean[] octets = new boolean[maxChar + 1]; for (char c : safeCharArray) { octets[c] = tru...
[ "private", "static", "boolean", "[", "]", "createSafeOctets", "(", "String", "safeChars", ")", "{", "int", "maxChar", "=", "-", "1", ";", "char", "[", "]", "safeCharArray", "=", "safeChars", ".", "toCharArray", "(", ")", ";", "for", "(", "char", "c", "...
Creates a boolean array with entries corresponding to the character values specified in safeChars set to true. The array is as small as is required to hold the given character information.
[ "Creates", "a", "boolean", "array", "with", "entries", "corresponding", "to", "the", "character", "values", "specified", "in", "safeChars", "set", "to", "true", ".", "The", "array", "is", "as", "small", "as", "is", "required", "to", "hold", "the", "given", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/net/PercentEscaper.java#L111-L122
61,492
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionColumn.java
ExpressionColumn.getTableName
String getTableName() { if (opType == OpTypes.MULTICOLUMN) { return tableName; } if (opType == OpTypes.COLUMN) { if (rangeVariable == null) { return tableName; } return rangeVariable.getTable().getName().name; } ret...
java
String getTableName() { if (opType == OpTypes.MULTICOLUMN) { return tableName; } if (opType == OpTypes.COLUMN) { if (rangeVariable == null) { return tableName; } return rangeVariable.getTable().getName().name; } ret...
[ "String", "getTableName", "(", ")", "{", "if", "(", "opType", "==", "OpTypes", ".", "MULTICOLUMN", ")", "{", "return", "tableName", ";", "}", "if", "(", "opType", "==", "OpTypes", ".", "COLUMN", ")", "{", "if", "(", "rangeVariable", "==", "null", ")", ...
Returns the table name for a column expression as a string @return table name
[ "Returns", "the", "table", "name", "for", "a", "column", "expression", "as", "a", "string" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionColumn.java#L770-L782
61,493
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionColumn.java
ExpressionColumn.voltAnnotateColumnXML
VoltXMLElement voltAnnotateColumnXML(VoltXMLElement exp) { if (tableName != null) { if (rangeVariable != null && rangeVariable.rangeTable != null && rangeVariable.tableAlias != null && rangeVariable.rangeTable.tableType == TableBase.SYSTEM_SUBQUERY) { ...
java
VoltXMLElement voltAnnotateColumnXML(VoltXMLElement exp) { if (tableName != null) { if (rangeVariable != null && rangeVariable.rangeTable != null && rangeVariable.tableAlias != null && rangeVariable.rangeTable.tableType == TableBase.SYSTEM_SUBQUERY) { ...
[ "VoltXMLElement", "voltAnnotateColumnXML", "(", "VoltXMLElement", "exp", ")", "{", "if", "(", "tableName", "!=", "null", ")", "{", "if", "(", "rangeVariable", "!=", "null", "&&", "rangeVariable", ".", "rangeTable", "!=", "null", "&&", "rangeVariable", ".", "ta...
VoltDB added method to provide detail for a non-catalog-dependent representation of this HSQLDB object. @return XML, correctly indented, representing this object.
[ "VoltDB", "added", "method", "to", "provide", "detail", "for", "a", "non", "-", "catalog", "-", "dependent", "representation", "of", "this", "HSQLDB", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionColumn.java#L1320-L1340
61,494
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.parseTablesAndParams
void parseTablesAndParams(VoltXMLElement root) { // Parse parameters first to satisfy a dependency of expression parsing // which happens during table scan parsing. parseParameters(root); parseCommonTableExpressions(root); for (VoltXMLElement node : root.children) { ...
java
void parseTablesAndParams(VoltXMLElement root) { // Parse parameters first to satisfy a dependency of expression parsing // which happens during table scan parsing. parseParameters(root); parseCommonTableExpressions(root); for (VoltXMLElement node : root.children) { ...
[ "void", "parseTablesAndParams", "(", "VoltXMLElement", "root", ")", "{", "// Parse parameters first to satisfy a dependency of expression parsing", "// which happens during table scan parsing.", "parseParameters", "(", "root", ")", ";", "parseCommonTableExpressions", "(", "root", "...
Parse tables and parameters . @param root @param db
[ "Parse", "tables", "and", "parameters", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L283-L299
61,495
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.parseExpressionNode
private AbstractExpression parseExpressionNode(VoltXMLElement exprNode) { String elementName = exprNode.name.toLowerCase(); XMLElementExpressionParser parser = m_exprParsers.get(elementName); if (parser == null) { throw new PlanningErrorException("Unsupported expression node '" + el...
java
private AbstractExpression parseExpressionNode(VoltXMLElement exprNode) { String elementName = exprNode.name.toLowerCase(); XMLElementExpressionParser parser = m_exprParsers.get(elementName); if (parser == null) { throw new PlanningErrorException("Unsupported expression node '" + el...
[ "private", "AbstractExpression", "parseExpressionNode", "(", "VoltXMLElement", "exprNode", ")", "{", "String", "elementName", "=", "exprNode", ".", "name", ".", "toLowerCase", "(", ")", ";", "XMLElementExpressionParser", "parser", "=", "m_exprParsers", ".", "get", "...
Given a VoltXMLElement expression node, translate it into an AbstractExpression. This is mostly a lookup in the table m_exprParsers.
[ "Given", "a", "VoltXMLElement", "expression", "node", "translate", "it", "into", "an", "AbstractExpression", ".", "This", "is", "mostly", "a", "lookup", "in", "the", "table", "m_exprParsers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L400-L410
61,496
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.parseVectorExpression
private AbstractExpression parseVectorExpression(VoltXMLElement exprNode) { ArrayList<AbstractExpression> args = new ArrayList<>(); for (VoltXMLElement argNode : exprNode.children) { assert(argNode != null); // recursively parse each argument subtree (could be any kind of express...
java
private AbstractExpression parseVectorExpression(VoltXMLElement exprNode) { ArrayList<AbstractExpression> args = new ArrayList<>(); for (VoltXMLElement argNode : exprNode.children) { assert(argNode != null); // recursively parse each argument subtree (could be any kind of express...
[ "private", "AbstractExpression", "parseVectorExpression", "(", "VoltXMLElement", "exprNode", ")", "{", "ArrayList", "<", "AbstractExpression", ">", "args", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "VoltXMLElement", "argNode", ":", "exprNode", ".",...
Parse a Vector value for SQL-IN
[ "Parse", "a", "Vector", "value", "for", "SQL", "-", "IN" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L415-L429
61,497
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.parseSubqueryExpression
private SelectSubqueryExpression parseSubqueryExpression(VoltXMLElement exprNode) { assert(exprNode.children.size() == 1); VoltXMLElement subqueryElmt = exprNode.children.get(0); AbstractParsedStmt subqueryStmt = parseSubquery(subqueryElmt); // add table to the query cache String...
java
private SelectSubqueryExpression parseSubqueryExpression(VoltXMLElement exprNode) { assert(exprNode.children.size() == 1); VoltXMLElement subqueryElmt = exprNode.children.get(0); AbstractParsedStmt subqueryStmt = parseSubquery(subqueryElmt); // add table to the query cache String...
[ "private", "SelectSubqueryExpression", "parseSubqueryExpression", "(", "VoltXMLElement", "exprNode", ")", "{", "assert", "(", "exprNode", ".", "children", ".", "size", "(", ")", "==", "1", ")", ";", "VoltXMLElement", "subqueryElmt", "=", "exprNode", ".", "children...
Parse an expression subquery
[ "Parse", "an", "expression", "subquery" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L596-L606
61,498
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.resolveStmtTableScanByAlias
private StmtTableScan resolveStmtTableScanByAlias(String tableAlias) { StmtTableScan tableScan = getStmtTableScanByAlias(tableAlias); if (tableScan != null) { return tableScan; } if (m_parentStmt != null) { // This may be a correlated subquery return m...
java
private StmtTableScan resolveStmtTableScanByAlias(String tableAlias) { StmtTableScan tableScan = getStmtTableScanByAlias(tableAlias); if (tableScan != null) { return tableScan; } if (m_parentStmt != null) { // This may be a correlated subquery return m...
[ "private", "StmtTableScan", "resolveStmtTableScanByAlias", "(", "String", "tableAlias", ")", "{", "StmtTableScan", "tableScan", "=", "getStmtTableScanByAlias", "(", "tableAlias", ")", ";", "if", "(", "tableScan", "!=", "null", ")", "{", "return", "tableScan", ";", ...
Return StmtTableScan by table alias. In case of correlated queries, may need to walk up the statement tree. @param tableAlias
[ "Return", "StmtTableScan", "by", "table", "alias", ".", "In", "case", "of", "correlated", "queries", "may", "need", "to", "walk", "up", "the", "statement", "tree", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L786-L796
61,499
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.addTableToStmtCache
protected StmtTableScan addTableToStmtCache(Table table, String tableAlias) { // Create an index into the query Catalog cache StmtTableScan tableScan = m_tableAliasMap.get(tableAlias); if (tableScan == null) { tableScan = new StmtTargetTableScan(table, tableAlias, m_stmtId); ...
java
protected StmtTableScan addTableToStmtCache(Table table, String tableAlias) { // Create an index into the query Catalog cache StmtTableScan tableScan = m_tableAliasMap.get(tableAlias); if (tableScan == null) { tableScan = new StmtTargetTableScan(table, tableAlias, m_stmtId); ...
[ "protected", "StmtTableScan", "addTableToStmtCache", "(", "Table", "table", ",", "String", "tableAlias", ")", "{", "// Create an index into the query Catalog cache", "StmtTableScan", "tableScan", "=", "m_tableAliasMap", ".", "get", "(", "tableAlias", ")", ";", "if", "("...
Add a table to the statement cache. @param table @param tableAlias @return the cache entry
[ "Add", "a", "table", "to", "the", "statement", "cache", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L804-L812