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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
124,300 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java | MiniCluster.createMetricRegistry | protected MetricRegistryImpl createMetricRegistry(Configuration config) {
return new MetricRegistryImpl(
MetricRegistryConfiguration.fromConfiguration(config),
ReporterSetup.fromConfiguration(config));
} | java | protected MetricRegistryImpl createMetricRegistry(Configuration config) {
return new MetricRegistryImpl(
MetricRegistryConfiguration.fromConfiguration(config),
ReporterSetup.fromConfiguration(config));
} | [
"protected",
"MetricRegistryImpl",
"createMetricRegistry",
"(",
"Configuration",
"config",
")",
"{",
"return",
"new",
"MetricRegistryImpl",
"(",
"MetricRegistryConfiguration",
".",
"fromConfiguration",
"(",
"config",
")",
",",
"ReporterSetup",
".",
"fromConfiguration",
"(... | Factory method to create the metric registry for the mini cluster.
@param config The configuration of the mini cluster | [
"Factory",
"method",
"to",
"create",
"the",
"metric",
"registry",
"for",
"the",
"mini",
"cluster",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java#L697-L701 |
124,301 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java | MiniCluster.createRpcService | protected RpcService createRpcService(
AkkaRpcServiceConfiguration akkaRpcServiceConfig,
boolean remoteEnabled,
String bindAddress) {
final Config akkaConfig;
if (remoteEnabled) {
akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration(), bindAddress, 0);
} else {
akkaConfig = ... | java | protected RpcService createRpcService(
AkkaRpcServiceConfiguration akkaRpcServiceConfig,
boolean remoteEnabled,
String bindAddress) {
final Config akkaConfig;
if (remoteEnabled) {
akkaConfig = AkkaUtils.getAkkaConfig(akkaRpcServiceConfig.getConfiguration(), bindAddress, 0);
} else {
akkaConfig = ... | [
"protected",
"RpcService",
"createRpcService",
"(",
"AkkaRpcServiceConfiguration",
"akkaRpcServiceConfig",
",",
"boolean",
"remoteEnabled",
",",
"String",
"bindAddress",
")",
"{",
"final",
"Config",
"akkaConfig",
";",
"if",
"(",
"remoteEnabled",
")",
"{",
"akkaConfig",
... | Factory method to instantiate the RPC service.
@param akkaRpcServiceConfig
The default RPC timeout for asynchronous "ask" requests.
@param remoteEnabled
True, if the RPC service should be reachable from other (remote) RPC services.
@param bindAddress
The address to bind the RPC service to. Only relevant when "remoteEn... | [
"Factory",
"method",
"to",
"instantiate",
"the",
"RPC",
"service",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java#L715-L733 |
124,302 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java | StreamGraphHasherV2.generateNodeHash | private boolean generateNodeHash(
StreamNode node,
HashFunction hashFunction,
Map<Integer, byte[]> hashes,
boolean isChainingEnabled,
StreamGraph streamGraph) {
// Check for user-specified ID
String userSpecifiedHash = node.getTransformationUID();
if (userSpecifiedHash == null) {
// Check that... | java | private boolean generateNodeHash(
StreamNode node,
HashFunction hashFunction,
Map<Integer, byte[]> hashes,
boolean isChainingEnabled,
StreamGraph streamGraph) {
// Check for user-specified ID
String userSpecifiedHash = node.getTransformationUID();
if (userSpecifiedHash == null) {
// Check that... | [
"private",
"boolean",
"generateNodeHash",
"(",
"StreamNode",
"node",
",",
"HashFunction",
"hashFunction",
",",
"Map",
"<",
"Integer",
",",
"byte",
"[",
"]",
">",
"hashes",
",",
"boolean",
"isChainingEnabled",
",",
"StreamGraph",
"streamGraph",
")",
"{",
"// Chec... | Generates a hash for the node and returns whether the operation was
successful.
@param node The node to generate the hash for
@param hashFunction The hash function to use
@param hashes The current state of generated hashes
@return <code>true</code> if the node hash has been generated.
<code>false</code>,... | [
"Generates",
"a",
"hash",
"for",
"the",
"node",
"and",
"returns",
"whether",
"the",
"operation",
"was",
"successful",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java#L144-L196 |
124,303 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java | StreamGraphHasherV2.generateUserSpecifiedHash | private byte[] generateUserSpecifiedHash(StreamNode node, Hasher hasher) {
hasher.putString(node.getTransformationUID(), Charset.forName("UTF-8"));
return hasher.hash().asBytes();
} | java | private byte[] generateUserSpecifiedHash(StreamNode node, Hasher hasher) {
hasher.putString(node.getTransformationUID(), Charset.forName("UTF-8"));
return hasher.hash().asBytes();
} | [
"private",
"byte",
"[",
"]",
"generateUserSpecifiedHash",
"(",
"StreamNode",
"node",
",",
"Hasher",
"hasher",
")",
"{",
"hasher",
".",
"putString",
"(",
"node",
".",
"getTransformationUID",
"(",
")",
",",
"Charset",
".",
"forName",
"(",
"\"UTF-8\"",
")",
")"... | Generates a hash from a user-specified ID. | [
"Generates",
"a",
"hash",
"from",
"a",
"user",
"-",
"specified",
"ID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java#L201-L205 |
124,304 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java | StreamGraphHasherV2.generateDeterministicHash | private byte[] generateDeterministicHash(
StreamNode node,
Hasher hasher,
Map<Integer, byte[]> hashes,
boolean isChainingEnabled,
StreamGraph streamGraph) {
// Include stream node to hash. We use the current size of the computed
// hashes as the ID. We cannot use the node's ID, because it is
// as... | java | private byte[] generateDeterministicHash(
StreamNode node,
Hasher hasher,
Map<Integer, byte[]> hashes,
boolean isChainingEnabled,
StreamGraph streamGraph) {
// Include stream node to hash. We use the current size of the computed
// hashes as the ID. We cannot use the node's ID, because it is
// as... | [
"private",
"byte",
"[",
"]",
"generateDeterministicHash",
"(",
"StreamNode",
"node",
",",
"Hasher",
"hasher",
",",
"Map",
"<",
"Integer",
",",
"byte",
"[",
"]",
">",
"hashes",
",",
"boolean",
"isChainingEnabled",
",",
"StreamGraph",
"streamGraph",
")",
"{",
... | Generates a deterministic hash from node-local properties and input and
output edges. | [
"Generates",
"a",
"deterministic",
"hash",
"from",
"node",
"-",
"local",
"properties",
"and",
"input",
"and",
"output",
"edges",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java#L211-L267 |
124,305 | apache/flink | flink-core/src/main/java/org/apache/flink/util/MathUtils.java | MathUtils.murmurHash | public static int murmurHash(int code) {
code *= 0xcc9e2d51;
code = Integer.rotateLeft(code, 15);
code *= 0x1b873593;
code = Integer.rotateLeft(code, 13);
code = code * 5 + 0xe6546b64;
code ^= 4;
code = bitMix(code);
if (code >= 0) {
return code;
}
else if (code != Integer.MIN_VALUE) {
retu... | java | public static int murmurHash(int code) {
code *= 0xcc9e2d51;
code = Integer.rotateLeft(code, 15);
code *= 0x1b873593;
code = Integer.rotateLeft(code, 13);
code = code * 5 + 0xe6546b64;
code ^= 4;
code = bitMix(code);
if (code >= 0) {
return code;
}
else if (code != Integer.MIN_VALUE) {
retu... | [
"public",
"static",
"int",
"murmurHash",
"(",
"int",
"code",
")",
"{",
"code",
"*=",
"0xcc9e2d51",
";",
"code",
"=",
"Integer",
".",
"rotateLeft",
"(",
"code",
",",
"15",
")",
";",
"code",
"*=",
"0x1b873593",
";",
"code",
"=",
"Integer",
".",
"rotateLe... | This function hashes an integer value.
<p>It is crucial to use different hash functions to partition data across machines and the internal partitioning of
data structures. This hash function is intended for partitioning across machines.
@param code The integer to be hashed.
@return The non-negative hash code for the ... | [
"This",
"function",
"hashes",
"an",
"integer",
"value",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/MathUtils.java#L134-L154 |
124,306 | apache/flink | flink-core/src/main/java/org/apache/flink/util/MathUtils.java | MathUtils.roundUpToPowerOfTwo | public static int roundUpToPowerOfTwo(int x) {
x = x - 1;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
return x + 1;
} | java | public static int roundUpToPowerOfTwo(int x) {
x = x - 1;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
return x + 1;
} | [
"public",
"static",
"int",
"roundUpToPowerOfTwo",
"(",
"int",
"x",
")",
"{",
"x",
"=",
"x",
"-",
"1",
";",
"x",
"|=",
"x",
">>",
"1",
";",
"x",
"|=",
"x",
">>",
"2",
";",
"x",
"|=",
"x",
">>",
"4",
";",
"x",
"|=",
"x",
">>",
"8",
";",
"x"... | Round the given number to the next power of two.
@param x number to round
@return x rounded up to the next power of two | [
"Round",
"the",
"given",
"number",
"to",
"the",
"next",
"power",
"of",
"two",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/MathUtils.java#L161-L169 |
124,307 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/StackTraceSampleService.java | StackTraceSampleService.requestStackTraceSample | public CompletableFuture<List<StackTraceElement[]>> requestStackTraceSample(
final StackTraceSampleableTask task,
@Nonnegative final int numSamples,
final Time delayBetweenSamples,
final int maxStackTraceDepth) {
checkNotNull(task, "task must not be null");
checkArgument(numSamples > 0, "numSamples mus... | java | public CompletableFuture<List<StackTraceElement[]>> requestStackTraceSample(
final StackTraceSampleableTask task,
@Nonnegative final int numSamples,
final Time delayBetweenSamples,
final int maxStackTraceDepth) {
checkNotNull(task, "task must not be null");
checkArgument(numSamples > 0, "numSamples mus... | [
"public",
"CompletableFuture",
"<",
"List",
"<",
"StackTraceElement",
"[",
"]",
">",
">",
"requestStackTraceSample",
"(",
"final",
"StackTraceSampleableTask",
"task",
",",
"@",
"Nonnegative",
"final",
"int",
"numSamples",
",",
"final",
"Time",
"delayBetweenSamples",
... | Returns a future that completes with a given number of stack trace samples of a task thread.
@param task The task to be sampled from.
@param numSamples The number of samples.
@param delayBetweenSamples The time to wait between taking samples.
@param maxStackTraceDepth The maximum depth of the ... | [
"Returns",
"a",
"future",
"that",
"completes",
"with",
"a",
"given",
"number",
"of",
"stack",
"trace",
"samples",
"of",
"a",
"task",
"thread",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/StackTraceSampleService.java#L60-L77 |
124,308 | apache/flink | flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/NoFetchingInput.java | NoFetchingInput.require | @Override
protected int require(int required) throws KryoException {
if(required > capacity) {
throw new KryoException("Buffer too small: capacity: " + capacity + ", " +
"required: " + required);
}
position = 0;
int bytesRead = 0;
int count;
while(true){
count = fill(buffer, bytesRead, required... | java | @Override
protected int require(int required) throws KryoException {
if(required > capacity) {
throw new KryoException("Buffer too small: capacity: " + capacity + ", " +
"required: " + required);
}
position = 0;
int bytesRead = 0;
int count;
while(true){
count = fill(buffer, bytesRead, required... | [
"@",
"Override",
"protected",
"int",
"require",
"(",
"int",
"required",
")",
"throws",
"KryoException",
"{",
"if",
"(",
"required",
">",
"capacity",
")",
"{",
"throw",
"new",
"KryoException",
"(",
"\"Buffer too small: capacity: \"",
"+",
"capacity",
"+",
"\", \"... | Require makes sure that at least required number of bytes are kept in the buffer. If not, then
it will load exactly the difference between required and currently available number of bytes.
Thus, it will only load the data which is required and never prefetch data.
@param required the number of bytes being available in... | [
"Require",
"makes",
"sure",
"that",
"at",
"least",
"required",
"number",
"of",
"bytes",
"are",
"kept",
"in",
"the",
"buffer",
".",
"If",
"not",
"then",
"it",
"will",
"load",
"exactly",
"the",
"difference",
"between",
"required",
"and",
"currently",
"availabl... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/NoFetchingInput.java#L65-L89 |
124,309 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MultipleIdsMessageAcknowledgingSourceBase.java | MultipleIdsMessageAcknowledgingSourceBase.acknowledgeIDs | @Override
protected final void acknowledgeIDs(long checkpointId, Set<UId> uniqueIds) {
LOG.debug("Acknowledging ids for checkpoint {}", checkpointId);
Iterator<Tuple2<Long, List<SessionId>>> iterator = sessionIdsPerSnapshot.iterator();
while (iterator.hasNext()) {
final Tuple2<Long, List<SessionId>> next = it... | java | @Override
protected final void acknowledgeIDs(long checkpointId, Set<UId> uniqueIds) {
LOG.debug("Acknowledging ids for checkpoint {}", checkpointId);
Iterator<Tuple2<Long, List<SessionId>>> iterator = sessionIdsPerSnapshot.iterator();
while (iterator.hasNext()) {
final Tuple2<Long, List<SessionId>> next = it... | [
"@",
"Override",
"protected",
"final",
"void",
"acknowledgeIDs",
"(",
"long",
"checkpointId",
",",
"Set",
"<",
"UId",
">",
"uniqueIds",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Acknowledging ids for checkpoint {}\"",
",",
"checkpointId",
")",
";",
"Iterator",
"<",... | Acknowledges the session ids.
@param checkpointId The id of the current checkout to acknowledge ids for.
@param uniqueIds The checkpointed unique ids which are ignored here. They only serve as a
means of de-duplicating messages when the acknowledgment after a checkpoint
fails. | [
"Acknowledges",
"the",
"session",
"ids",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MultipleIdsMessageAcknowledgingSourceBase.java#L114-L127 |
124,310 | apache/flink | flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/UserDefinedFunction.java | UserDefinedFunction.functionIdentifier | public final String functionIdentifier() {
final String md5 = EncodingUtils.hex(EncodingUtils.md5(EncodingUtils.encodeObjectToString(this)));
return getClass().getCanonicalName().replace('.', '$').concat("$").concat(md5);
} | java | public final String functionIdentifier() {
final String md5 = EncodingUtils.hex(EncodingUtils.md5(EncodingUtils.encodeObjectToString(this)));
return getClass().getCanonicalName().replace('.', '$').concat("$").concat(md5);
} | [
"public",
"final",
"String",
"functionIdentifier",
"(",
")",
"{",
"final",
"String",
"md5",
"=",
"EncodingUtils",
".",
"hex",
"(",
"EncodingUtils",
".",
"md5",
"(",
"EncodingUtils",
".",
"encodeObjectToString",
"(",
"this",
")",
")",
")",
";",
"return",
"get... | Returns a unique, serialized representation for this function. | [
"Returns",
"a",
"unique",
"serialized",
"representation",
"for",
"this",
"function",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/UserDefinedFunction.java#L36-L39 |
124,311 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/JobID.java | JobID.fromHexString | public static JobID fromHexString(String hexString) {
try {
return new JobID(StringUtils.hexStringToByte(hexString));
} catch (Exception e) {
throw new IllegalArgumentException("Cannot parse JobID from \"" + hexString + "\". The expected format is " +
"[0-9a-fA-F]{32}, e.g. fd72014d4c864993a2e5a9287b4a9c5... | java | public static JobID fromHexString(String hexString) {
try {
return new JobID(StringUtils.hexStringToByte(hexString));
} catch (Exception e) {
throw new IllegalArgumentException("Cannot parse JobID from \"" + hexString + "\". The expected format is " +
"[0-9a-fA-F]{32}, e.g. fd72014d4c864993a2e5a9287b4a9c5... | [
"public",
"static",
"JobID",
"fromHexString",
"(",
"String",
"hexString",
")",
"{",
"try",
"{",
"return",
"new",
"JobID",
"(",
"StringUtils",
".",
"hexStringToByte",
"(",
"hexString",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
... | Parses a JobID from the given string.
@param hexString string representation of a JobID
@return Parsed JobID
@throws IllegalArgumentException if the JobID could not be parsed from the given string | [
"Parses",
"a",
"JobID",
"from",
"the",
"given",
"string",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/JobID.java#L107-L114 |
124,312 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/AbstractTopNFunction.java | AbstractTopNFunction.initRankEnd | protected long initRankEnd(BaseRow row) throws Exception {
if (isConstantRankEnd) {
return rankEnd;
} else {
Long rankEndValue = rankEndState.value();
long curRankEnd = rankEndFetcher.apply(row);
if (rankEndValue == null) {
rankEnd = curRankEnd;
rankEndState.update(rankEnd);
return rankEnd;
... | java | protected long initRankEnd(BaseRow row) throws Exception {
if (isConstantRankEnd) {
return rankEnd;
} else {
Long rankEndValue = rankEndState.value();
long curRankEnd = rankEndFetcher.apply(row);
if (rankEndValue == null) {
rankEnd = curRankEnd;
rankEndState.update(rankEnd);
return rankEnd;
... | [
"protected",
"long",
"initRankEnd",
"(",
"BaseRow",
"row",
")",
"throws",
"Exception",
"{",
"if",
"(",
"isConstantRankEnd",
")",
"{",
"return",
"rankEnd",
";",
"}",
"else",
"{",
"Long",
"rankEndValue",
"=",
"rankEndState",
".",
"value",
"(",
")",
";",
"lon... | Initialize rank end.
@param row input record
@return rank end
@throws Exception | [
"Initialize",
"rank",
"end",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/AbstractTopNFunction.java#L189-L208 |
124,313 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/AbstractTopNFunction.java | AbstractTopNFunction.checkSortKeyInBufferRange | protected boolean checkSortKeyInBufferRange(BaseRow sortKey, TopNBuffer buffer) {
Comparator<BaseRow> comparator = buffer.getSortKeyComparator();
Map.Entry<BaseRow, Collection<BaseRow>> worstEntry = buffer.lastEntry();
if (worstEntry == null) {
// return true if the buffer is empty.
return true;
} else {
... | java | protected boolean checkSortKeyInBufferRange(BaseRow sortKey, TopNBuffer buffer) {
Comparator<BaseRow> comparator = buffer.getSortKeyComparator();
Map.Entry<BaseRow, Collection<BaseRow>> worstEntry = buffer.lastEntry();
if (worstEntry == null) {
// return true if the buffer is empty.
return true;
} else {
... | [
"protected",
"boolean",
"checkSortKeyInBufferRange",
"(",
"BaseRow",
"sortKey",
",",
"TopNBuffer",
"buffer",
")",
"{",
"Comparator",
"<",
"BaseRow",
">",
"comparator",
"=",
"buffer",
".",
"getSortKeyComparator",
"(",
")",
";",
"Map",
".",
"Entry",
"<",
"BaseRow"... | Checks whether the record should be put into the buffer.
@param sortKey sortKey to test
@param buffer buffer to add
@return true if the record should be put into the buffer. | [
"Checks",
"whether",
"the",
"record",
"should",
"be",
"put",
"into",
"the",
"buffer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/AbstractTopNFunction.java#L217-L232 |
124,314 | apache/flink | flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java | NFA.open | public void open(RuntimeContext cepRuntimeContext, Configuration conf) throws Exception {
for (State<T> state : getStates()) {
for (StateTransition<T> transition : state.getStateTransitions()) {
IterativeCondition condition = transition.getCondition();
FunctionUtils.setFunctionRuntimeContext(condition, cep... | java | public void open(RuntimeContext cepRuntimeContext, Configuration conf) throws Exception {
for (State<T> state : getStates()) {
for (StateTransition<T> transition : state.getStateTransitions()) {
IterativeCondition condition = transition.getCondition();
FunctionUtils.setFunctionRuntimeContext(condition, cep... | [
"public",
"void",
"open",
"(",
"RuntimeContext",
"cepRuntimeContext",
",",
"Configuration",
"conf",
")",
"throws",
"Exception",
"{",
"for",
"(",
"State",
"<",
"T",
">",
"state",
":",
"getStates",
"(",
")",
")",
"{",
"for",
"(",
"StateTransition",
"<",
"T",... | Initialization method for the NFA. It is called before any element is passed and thus suitable for one time setup
work.
@param cepRuntimeContext runtime context of the enclosing operator
@param conf The configuration containing the parameters attached to the contract. | [
"Initialization",
"method",
"for",
"the",
"NFA",
".",
"It",
"is",
"called",
"before",
"any",
"element",
"is",
"passed",
"and",
"thus",
"suitable",
"for",
"one",
"time",
"setup",
"work",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L179-L187 |
124,315 | apache/flink | flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java | NFA.close | public void close() throws Exception {
for (State<T> state : getStates()) {
for (StateTransition<T> transition : state.getStateTransitions()) {
IterativeCondition condition = transition.getCondition();
FunctionUtils.closeFunction(condition);
}
}
} | java | public void close() throws Exception {
for (State<T> state : getStates()) {
for (StateTransition<T> transition : state.getStateTransitions()) {
IterativeCondition condition = transition.getCondition();
FunctionUtils.closeFunction(condition);
}
}
} | [
"public",
"void",
"close",
"(",
")",
"throws",
"Exception",
"{",
"for",
"(",
"State",
"<",
"T",
">",
"state",
":",
"getStates",
"(",
")",
")",
"{",
"for",
"(",
"StateTransition",
"<",
"T",
">",
"transition",
":",
"state",
".",
"getStateTransitions",
"(... | Tear-down method for the NFA. | [
"Tear",
"-",
"down",
"method",
"for",
"the",
"NFA",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L192-L199 |
124,316 | apache/flink | flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java | NFA.process | public Collection<Map<String, List<T>>> process(
final SharedBufferAccessor<T> sharedBufferAccessor,
final NFAState nfaState,
final T event,
final long timestamp,
final AfterMatchSkipStrategy afterMatchSkipStrategy,
final TimerService timerService) throws Exception {
try (EventWrapper eventWrapper =... | java | public Collection<Map<String, List<T>>> process(
final SharedBufferAccessor<T> sharedBufferAccessor,
final NFAState nfaState,
final T event,
final long timestamp,
final AfterMatchSkipStrategy afterMatchSkipStrategy,
final TimerService timerService) throws Exception {
try (EventWrapper eventWrapper =... | [
"public",
"Collection",
"<",
"Map",
"<",
"String",
",",
"List",
"<",
"T",
">",
">",
">",
"process",
"(",
"final",
"SharedBufferAccessor",
"<",
"T",
">",
"sharedBufferAccessor",
",",
"final",
"NFAState",
"nfaState",
",",
"final",
"T",
"event",
",",
"final",... | Processes the next input event. If some of the computations reach a final state then the
resulting event sequences are returned. If computations time out and timeout handling is
activated, then the timed out event patterns are returned.
<p>If computations reach a stop state, the path forward is discarded and currently... | [
"Processes",
"the",
"next",
"input",
"event",
".",
"If",
"some",
"of",
"the",
"computations",
"reach",
"a",
"final",
"state",
"then",
"the",
"resulting",
"event",
"sequences",
"are",
"returned",
".",
"If",
"computations",
"time",
"out",
"and",
"timeout",
"ha... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L220-L230 |
124,317 | apache/flink | flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java | NFA.extractCurrentMatches | private Map<String, List<EventId>> extractCurrentMatches(
final SharedBufferAccessor<T> sharedBufferAccessor,
final ComputationState computationState) throws Exception {
if (computationState.getPreviousBufferEntry() == null) {
return new HashMap<>();
}
List<Map<String, List<EventId>>> paths = sharedBuff... | java | private Map<String, List<EventId>> extractCurrentMatches(
final SharedBufferAccessor<T> sharedBufferAccessor,
final ComputationState computationState) throws Exception {
if (computationState.getPreviousBufferEntry() == null) {
return new HashMap<>();
}
List<Map<String, List<EventId>>> paths = sharedBuff... | [
"private",
"Map",
"<",
"String",
",",
"List",
"<",
"EventId",
">",
">",
"extractCurrentMatches",
"(",
"final",
"SharedBufferAccessor",
"<",
"T",
">",
"sharedBufferAccessor",
",",
"final",
"ComputationState",
"computationState",
")",
"throws",
"Exception",
"{",
"if... | Extracts all the sequences of events from the start to the given computation state. An event
sequence is returned as a map which contains the events and the names of the states to which
the events were mapped.
@param sharedBufferAccessor The accessor to {@link SharedBuffer} from which to extract the matches
@param com... | [
"Extracts",
"all",
"the",
"sequences",
"of",
"events",
"from",
"the",
"start",
"to",
"the",
"given",
"computation",
"state",
".",
"An",
"event",
"sequence",
"is",
"returned",
"as",
"a",
"map",
"which",
"contains",
"the",
"events",
"and",
"the",
"names",
"o... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L765-L783 |
124,318 | apache/flink | flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowSchemaConverter.java | JsonRowSchemaConverter.convert | @SuppressWarnings("unchecked")
public static <T> TypeInformation<T> convert(String jsonSchema) {
Preconditions.checkNotNull(jsonSchema, "JSON schema");
final ObjectMapper mapper = new ObjectMapper();
mapper.getFactory()
.enable(JsonParser.Feature.ALLOW_COMMENTS)
.enable(JsonParser.Feature.ALLOW_UNQUOTED_FI... | java | @SuppressWarnings("unchecked")
public static <T> TypeInformation<T> convert(String jsonSchema) {
Preconditions.checkNotNull(jsonSchema, "JSON schema");
final ObjectMapper mapper = new ObjectMapper();
mapper.getFactory()
.enable(JsonParser.Feature.ALLOW_COMMENTS)
.enable(JsonParser.Feature.ALLOW_UNQUOTED_FI... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"TypeInformation",
"<",
"T",
">",
"convert",
"(",
"String",
"jsonSchema",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"jsonSchema",
",",
"\"JSON schema\"",
")",
";"... | Converts a JSON schema into Flink's type information. Throws an exception if the schema
cannot converted because of loss of precision or too flexible schema.
<p>The converter can resolve simple schema references to solve those cases where entities
are defined at the beginning and then used throughout a document. | [
"Converts",
"a",
"JSON",
"schema",
"into",
"Flink",
"s",
"type",
"information",
".",
"Throws",
"an",
"exception",
"if",
"the",
"schema",
"cannot",
"converted",
"because",
"of",
"loss",
"of",
"precision",
"or",
"too",
"flexible",
"schema",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowSchemaConverter.java#L97-L113 |
124,319 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskExecutionState.java | TaskExecutionState.getError | public Throwable getError(ClassLoader userCodeClassloader) {
if (this.throwable == null) {
return null;
}
else {
return this.throwable.deserializeError(userCodeClassloader);
}
} | java | public Throwable getError(ClassLoader userCodeClassloader) {
if (this.throwable == null) {
return null;
}
else {
return this.throwable.deserializeError(userCodeClassloader);
}
} | [
"public",
"Throwable",
"getError",
"(",
"ClassLoader",
"userCodeClassloader",
")",
"{",
"if",
"(",
"this",
".",
"throwable",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"this",
".",
"throwable",
".",
"deserializeError",
"(",
... | Gets the attached exception, which is in serialized form. Returns null,
if the status update is no failure with an associated exception.
@param userCodeClassloader The classloader that can resolve user-defined exceptions.
@return The attached exception, or null, if none. | [
"Gets",
"the",
"attached",
"exception",
"which",
"is",
"in",
"serialized",
"form",
".",
"Returns",
"null",
"if",
"the",
"status",
"update",
"is",
"no",
"failure",
"with",
"an",
"associated",
"exception",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskExecutionState.java#L130-L137 |
124,320 | apache/flink | flink-filesystems/flink-swift-fs-hadoop/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getPasswordFromCredentialProviders | protected char[] getPasswordFromCredentialProviders(String name)
throws IOException {
char[] pass = null;
try {
List<CredentialProvider> providers =
CredentialProviderFactory.getProviders(this);
if (providers != null) {
for (CredentialProvider provider : providers) {
... | java | protected char[] getPasswordFromCredentialProviders(String name)
throws IOException {
char[] pass = null;
try {
List<CredentialProvider> providers =
CredentialProviderFactory.getProviders(this);
if (providers != null) {
for (CredentialProvider provider : providers) {
... | [
"protected",
"char",
"[",
"]",
"getPasswordFromCredentialProviders",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"char",
"[",
"]",
"pass",
"=",
"null",
";",
"try",
"{",
"List",
"<",
"CredentialProvider",
">",
"providers",
"=",
"CredentialProviderFa... | Try and resolve the provided element name as a credential provider
alias.
@param name alias of the provisioned credential
@return password or null if not found
@throws IOException | [
"Try",
"and",
"resolve",
"the",
"provided",
"element",
"name",
"as",
"a",
"credential",
"provider",
"alias",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-swift-fs-hadoop/src/main/java/org/apache/hadoop/conf/Configuration.java#L1929-L1957 |
124,321 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java | IterativeDataSet.closeWith | public DataSet<T> closeWith(DataSet<T> iterationResult) {
return new BulkIterationResultSet<T>(getExecutionEnvironment(), getType(), this, iterationResult);
} | java | public DataSet<T> closeWith(DataSet<T> iterationResult) {
return new BulkIterationResultSet<T>(getExecutionEnvironment(), getType(), this, iterationResult);
} | [
"public",
"DataSet",
"<",
"T",
">",
"closeWith",
"(",
"DataSet",
"<",
"T",
">",
"iterationResult",
")",
"{",
"return",
"new",
"BulkIterationResultSet",
"<",
"T",
">",
"(",
"getExecutionEnvironment",
"(",
")",
",",
"getType",
"(",
")",
",",
"this",
",",
"... | Closes the iteration. This method defines the end of the iterative program part.
@param iterationResult The data set that will be fed back to the next iteration.
@return The DataSet that represents the result of the iteration, after the computation has terminated.
@see DataSet#iterate(int) | [
"Closes",
"the",
"iteration",
".",
"This",
"method",
"defines",
"the",
"end",
"of",
"the",
"iterative",
"program",
"part",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L63-L65 |
124,322 | apache/flink | flink-core/src/main/java/org/apache/flink/util/AbstractID.java | AbstractID.getBytes | public byte[] getBytes() {
byte[] bytes = new byte[SIZE];
longToByteArray(lowerPart, bytes, 0);
longToByteArray(upperPart, bytes, SIZE_OF_LONG);
return bytes;
} | java | public byte[] getBytes() {
byte[] bytes = new byte[SIZE];
longToByteArray(lowerPart, bytes, 0);
longToByteArray(upperPart, bytes, SIZE_OF_LONG);
return bytes;
} | [
"public",
"byte",
"[",
"]",
"getBytes",
"(",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"SIZE",
"]",
";",
"longToByteArray",
"(",
"lowerPart",
",",
"bytes",
",",
"0",
")",
";",
"longToByteArray",
"(",
"upperPart",
",",
"bytes",
","... | Gets the bytes underlying this ID.
@return The bytes underlying this ID. | [
"Gets",
"the",
"bytes",
"underlying",
"this",
"ID",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractID.java#L123-L128 |
124,323 | apache/flink | flink-core/src/main/java/org/apache/flink/util/AbstractID.java | AbstractID.toHexString | public final String toHexString() {
if (this.hexString == null) {
final byte[] ba = new byte[SIZE];
longToByteArray(this.lowerPart, ba, 0);
longToByteArray(this.upperPart, ba, SIZE_OF_LONG);
this.hexString = StringUtils.byteToHexString(ba);
}
return this.hexString;
} | java | public final String toHexString() {
if (this.hexString == null) {
final byte[] ba = new byte[SIZE];
longToByteArray(this.lowerPart, ba, 0);
longToByteArray(this.upperPart, ba, SIZE_OF_LONG);
this.hexString = StringUtils.byteToHexString(ba);
}
return this.hexString;
} | [
"public",
"final",
"String",
"toHexString",
"(",
")",
"{",
"if",
"(",
"this",
".",
"hexString",
"==",
"null",
")",
"{",
"final",
"byte",
"[",
"]",
"ba",
"=",
"new",
"byte",
"[",
"SIZE",
"]",
";",
"longToByteArray",
"(",
"this",
".",
"lowerPart",
",",... | Returns pure String representation of the ID in hexadecimal. This method should be used to construct things like
paths etc., that require a stable representation and is therefore final. | [
"Returns",
"pure",
"String",
"representation",
"of",
"the",
"ID",
"in",
"hexadecimal",
".",
"This",
"method",
"should",
"be",
"used",
"to",
"construct",
"things",
"like",
"paths",
"etc",
".",
"that",
"require",
"a",
"stable",
"representation",
"and",
"is",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractID.java#L134-L144 |
124,324 | apache/flink | flink-core/src/main/java/org/apache/flink/util/AbstractID.java | AbstractID.byteArrayToLong | private static long byteArrayToLong(byte[] ba, int offset) {
long l = 0;
for (int i = 0; i < SIZE_OF_LONG; ++i) {
l |= (ba[offset + SIZE_OF_LONG - 1 - i] & 0xffL) << (i << 3);
}
return l;
} | java | private static long byteArrayToLong(byte[] ba, int offset) {
long l = 0;
for (int i = 0; i < SIZE_OF_LONG; ++i) {
l |= (ba[offset + SIZE_OF_LONG - 1 - i] & 0xffL) << (i << 3);
}
return l;
} | [
"private",
"static",
"long",
"byteArrayToLong",
"(",
"byte",
"[",
"]",
"ba",
",",
"int",
"offset",
")",
"{",
"long",
"l",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"SIZE_OF_LONG",
";",
"++",
"i",
")",
"{",
"l",
"|=",
"(",
... | Converts the given byte array to a long.
@param ba the byte array to be converted
@param offset the offset indicating at which byte inside the array the conversion shall begin
@return the long variable | [
"Converts",
"the",
"given",
"byte",
"array",
"to",
"a",
"long",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractID.java#L193-L201 |
124,325 | apache/flink | flink-core/src/main/java/org/apache/flink/util/AbstractID.java | AbstractID.longToByteArray | private static void longToByteArray(long l, byte[] ba, int offset) {
for (int i = 0; i < SIZE_OF_LONG; ++i) {
final int shift = i << 3; // i * 8
ba[offset + SIZE_OF_LONG - 1 - i] = (byte) ((l & (0xffL << shift)) >>> shift);
}
} | java | private static void longToByteArray(long l, byte[] ba, int offset) {
for (int i = 0; i < SIZE_OF_LONG; ++i) {
final int shift = i << 3; // i * 8
ba[offset + SIZE_OF_LONG - 1 - i] = (byte) ((l & (0xffL << shift)) >>> shift);
}
} | [
"private",
"static",
"void",
"longToByteArray",
"(",
"long",
"l",
",",
"byte",
"[",
"]",
"ba",
",",
"int",
"offset",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"SIZE_OF_LONG",
";",
"++",
"i",
")",
"{",
"final",
"int",
"shift",
"="... | Converts a long to a byte array.
@param l the long variable to be converted
@param ba the byte array to store the result the of the conversion
@param offset offset indicating at what position inside the byte array the result of the conversion shall be stored | [
"Converts",
"a",
"long",
"to",
"a",
"byte",
"array",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractID.java#L210-L215 |
124,326 | apache/flink | flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaTopicPartitionAssigner.java | KafkaTopicPartitionAssigner.assign | public static int assign(KafkaTopicPartition partition, int numParallelSubtasks) {
int startIndex = ((partition.getTopic().hashCode() * 31) & 0x7FFFFFFF) % numParallelSubtasks;
// here, the assumption is that the id of Kafka partitions are always ascending
// starting from 0, and therefore can be used directly a... | java | public static int assign(KafkaTopicPartition partition, int numParallelSubtasks) {
int startIndex = ((partition.getTopic().hashCode() * 31) & 0x7FFFFFFF) % numParallelSubtasks;
// here, the assumption is that the id of Kafka partitions are always ascending
// starting from 0, and therefore can be used directly a... | [
"public",
"static",
"int",
"assign",
"(",
"KafkaTopicPartition",
"partition",
",",
"int",
"numParallelSubtasks",
")",
"{",
"int",
"startIndex",
"=",
"(",
"(",
"partition",
".",
"getTopic",
"(",
")",
".",
"hashCode",
"(",
")",
"*",
"31",
")",
"&",
"0x7FFFFF... | Returns the index of the target subtask that a specific Kafka partition should be
assigned to.
<p>The resulting distribution of partitions of a single topic has the following contract:
<ul>
<li>1. Uniformly distributed across subtasks</li>
<li>2. Partitions are round-robin distributed (strictly clockwise w.r.t. ascend... | [
"Returns",
"the",
"index",
"of",
"the",
"target",
"subtask",
"that",
"a",
"specific",
"Kafka",
"partition",
"should",
"be",
"assigned",
"to",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaTopicPartitionAssigner.java#L51-L57 |
124,327 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java | GatherSumApplyIteration.withEdges | public static <K, VV, EV, M> GatherSumApplyIteration<K, VV, EV, M>
withEdges(DataSet<Edge<K, EV>> edges, GatherFunction<VV, EV, M> gather,
SumFunction<VV, EV, M> sum, ApplyFunction<K, VV, M> apply, int maximumNumberOfIterations) {
return new GatherSumApplyIteration<>(gather, sum, apply, edges, maximumNumberOfIte... | java | public static <K, VV, EV, M> GatherSumApplyIteration<K, VV, EV, M>
withEdges(DataSet<Edge<K, EV>> edges, GatherFunction<VV, EV, M> gather,
SumFunction<VV, EV, M> sum, ApplyFunction<K, VV, M> apply, int maximumNumberOfIterations) {
return new GatherSumApplyIteration<>(gather, sum, apply, edges, maximumNumberOfIte... | [
"public",
"static",
"<",
"K",
",",
"VV",
",",
"EV",
",",
"M",
">",
"GatherSumApplyIteration",
"<",
"K",
",",
"VV",
",",
"EV",
",",
"M",
">",
"withEdges",
"(",
"DataSet",
"<",
"Edge",
"<",
"K",
",",
"EV",
">",
">",
"edges",
",",
"GatherFunction",
... | Creates a new gather-sum-apply iteration operator for graphs.
@param edges The edge DataSet
@param gather The gather function of the GSA iteration
@param sum The sum function of the GSA iteration
@param apply The apply function of the GSA iteration
@param maximumNumberOfIterations The maximum number of iterations ex... | [
"Creates",
"a",
"new",
"gather",
"-",
"sum",
"-",
"apply",
"iteration",
"operator",
"for",
"graphs",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java#L266-L271 |
124,328 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java | TopNBuffer.put | public int put(BaseRow sortKey, BaseRow value) {
currentTopNum += 1;
// update treeMap
Collection<BaseRow> collection = treeMap.get(sortKey);
if (collection == null) {
collection = valueSupplier.get();
treeMap.put(sortKey, collection);
}
collection.add(value);
return collection.size();
} | java | public int put(BaseRow sortKey, BaseRow value) {
currentTopNum += 1;
// update treeMap
Collection<BaseRow> collection = treeMap.get(sortKey);
if (collection == null) {
collection = valueSupplier.get();
treeMap.put(sortKey, collection);
}
collection.add(value);
return collection.size();
} | [
"public",
"int",
"put",
"(",
"BaseRow",
"sortKey",
",",
"BaseRow",
"value",
")",
"{",
"currentTopNum",
"+=",
"1",
";",
"// update treeMap",
"Collection",
"<",
"BaseRow",
">",
"collection",
"=",
"treeMap",
".",
"get",
"(",
"sortKey",
")",
";",
"if",
"(",
... | Appends a record into the buffer.
@param sortKey sort key with which the specified value is to be associated
@param value record which is to be appended
@return the size of the collection under the sortKey. | [
"Appends",
"a",
"record",
"into",
"the",
"buffer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java#L58-L68 |
124,329 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java | TopNBuffer.removeAll | void removeAll(BaseRow sortKey) {
Collection<BaseRow> list = treeMap.get(sortKey);
if (list != null) {
currentTopNum -= list.size();
treeMap.remove(sortKey);
}
} | java | void removeAll(BaseRow sortKey) {
Collection<BaseRow> list = treeMap.get(sortKey);
if (list != null) {
currentTopNum -= list.size();
treeMap.remove(sortKey);
}
} | [
"void",
"removeAll",
"(",
"BaseRow",
"sortKey",
")",
"{",
"Collection",
"<",
"BaseRow",
">",
"list",
"=",
"treeMap",
".",
"get",
"(",
"sortKey",
")",
";",
"if",
"(",
"list",
"!=",
"null",
")",
"{",
"currentTopNum",
"-=",
"list",
".",
"size",
"(",
")"... | Removes all record list from the buffer under the sortKey.
@param sortKey key to remove | [
"Removes",
"all",
"record",
"list",
"from",
"the",
"buffer",
"under",
"the",
"sortKey",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java#L109-L115 |
124,330 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java | TopNBuffer.removeLast | BaseRow removeLast() {
Map.Entry<BaseRow, Collection<BaseRow>> last = treeMap.lastEntry();
BaseRow lastElement = null;
if (last != null) {
Collection<BaseRow> list = last.getValue();
lastElement = getLastElement(list);
if (lastElement != null) {
if (list.remove(lastElement)) {
currentTopNum -= 1... | java | BaseRow removeLast() {
Map.Entry<BaseRow, Collection<BaseRow>> last = treeMap.lastEntry();
BaseRow lastElement = null;
if (last != null) {
Collection<BaseRow> list = last.getValue();
lastElement = getLastElement(list);
if (lastElement != null) {
if (list.remove(lastElement)) {
currentTopNum -= 1... | [
"BaseRow",
"removeLast",
"(",
")",
"{",
"Map",
".",
"Entry",
"<",
"BaseRow",
",",
"Collection",
"<",
"BaseRow",
">",
">",
"last",
"=",
"treeMap",
".",
"lastEntry",
"(",
")",
";",
"BaseRow",
"lastElement",
"=",
"null",
";",
"if",
"(",
"last",
"!=",
"n... | Removes the last record of the last Entry in the buffer.
@return removed record | [
"Removes",
"the",
"last",
"record",
"of",
"the",
"last",
"Entry",
"in",
"the",
"buffer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java#L122-L138 |
124,331 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java | TopNBuffer.getElement | BaseRow getElement(int rank) {
int curRank = 0;
Iterator<Map.Entry<BaseRow, Collection<BaseRow>>> iter = treeMap.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry<BaseRow, Collection<BaseRow>> entry = iter.next();
Collection<BaseRow> list = entry.getValue();
Iterator<BaseRow> listIter = list.ite... | java | BaseRow getElement(int rank) {
int curRank = 0;
Iterator<Map.Entry<BaseRow, Collection<BaseRow>>> iter = treeMap.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry<BaseRow, Collection<BaseRow>> entry = iter.next();
Collection<BaseRow> list = entry.getValue();
Iterator<BaseRow> listIter = list.ite... | [
"BaseRow",
"getElement",
"(",
"int",
"rank",
")",
"{",
"int",
"curRank",
"=",
"0",
";",
"Iterator",
"<",
"Map",
".",
"Entry",
"<",
"BaseRow",
",",
"Collection",
"<",
"BaseRow",
">",
">",
">",
"iter",
"=",
"treeMap",
".",
"entrySet",
"(",
")",
".",
... | Gets record which rank is given value.
@param rank rank value to search
@return the record which rank is given value | [
"Gets",
"record",
"which",
"rank",
"is",
"given",
"value",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/TopNBuffer.java#L146-L163 |
124,332 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.partitionCustom | public <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, int field) {
Keys.ExpressionKeys<T> outExpressionKeys = new Keys.ExpressionKeys<>(new int[]{field}, getType());
return partitionCustom(partitioner, outExpressionKeys);
} | java | public <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, int field) {
Keys.ExpressionKeys<T> outExpressionKeys = new Keys.ExpressionKeys<>(new int[]{field}, getType());
return partitionCustom(partitioner, outExpressionKeys);
} | [
"public",
"<",
"K",
">",
"DataStream",
"<",
"T",
">",
"partitionCustom",
"(",
"Partitioner",
"<",
"K",
">",
"partitioner",
",",
"int",
"field",
")",
"{",
"Keys",
".",
"ExpressionKeys",
"<",
"T",
">",
"outExpressionKeys",
"=",
"new",
"Keys",
".",
"Express... | Partitions a tuple DataStream on the specified key fields using a custom partitioner.
This method takes the key position to partition on, and a partitioner that accepts the key type.
<p>Note: This method works only on single field keys.
@param partitioner The partitioner to assign partitions to keys.
@param field The... | [
"Partitions",
"a",
"tuple",
"DataStream",
"on",
"the",
"specified",
"key",
"fields",
"using",
"a",
"custom",
"partitioner",
".",
"This",
"method",
"takes",
"the",
"key",
"position",
"to",
"partition",
"on",
"and",
"a",
"partitioner",
"that",
"accepts",
"the",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L355-L358 |
124,333 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.partitionCustom | public <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, KeySelector<T, K> keySelector) {
return setConnectionType(new CustomPartitionerWrapper<>(clean(partitioner),
clean(keySelector)));
} | java | public <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, KeySelector<T, K> keySelector) {
return setConnectionType(new CustomPartitionerWrapper<>(clean(partitioner),
clean(keySelector)));
} | [
"public",
"<",
"K",
">",
"DataStream",
"<",
"T",
">",
"partitionCustom",
"(",
"Partitioner",
"<",
"K",
">",
"partitioner",
",",
"KeySelector",
"<",
"T",
",",
"K",
">",
"keySelector",
")",
"{",
"return",
"setConnectionType",
"(",
"new",
"CustomPartitionerWrap... | Partitions a DataStream on the key returned by the selector, using a custom partitioner.
This method takes the key selector to get the key to partition on, and a partitioner that
accepts the key type.
<p>Note: This method works only on single field keys, i.e. the selector cannot return tuples
of fields.
@param partit... | [
"Partitions",
"a",
"DataStream",
"on",
"the",
"key",
"returned",
"by",
"the",
"selector",
"using",
"a",
"custom",
"partitioner",
".",
"This",
"method",
"takes",
"the",
"key",
"selector",
"to",
"get",
"the",
"key",
"to",
"partition",
"on",
"and",
"a",
"part... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L391-L394 |
124,334 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.partitionCustom | private <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, Keys<T> keys) {
KeySelector<T, K> keySelector = KeySelectorUtil.getSelectorForOneKey(keys, partitioner, getType(), getExecutionConfig());
return setConnectionType(
new CustomPartitionerWrapper<>(
clean(partitioner),
clean(keySele... | java | private <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, Keys<T> keys) {
KeySelector<T, K> keySelector = KeySelectorUtil.getSelectorForOneKey(keys, partitioner, getType(), getExecutionConfig());
return setConnectionType(
new CustomPartitionerWrapper<>(
clean(partitioner),
clean(keySele... | [
"private",
"<",
"K",
">",
"DataStream",
"<",
"T",
">",
"partitionCustom",
"(",
"Partitioner",
"<",
"K",
">",
"partitioner",
",",
"Keys",
"<",
"T",
">",
"keys",
")",
"{",
"KeySelector",
"<",
"T",
",",
"K",
">",
"keySelector",
"=",
"KeySelectorUtil",
"."... | private helper method for custom partitioning | [
"private",
"helper",
"method",
"for",
"custom",
"partitioning"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L397-L404 |
124,335 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.assignTimestamps | @Deprecated
public SingleOutputStreamOperator<T> assignTimestamps(TimestampExtractor<T> extractor) {
// match parallelism to input, otherwise dop=1 sources could lead to some strange
// behaviour: the watermark will creep along very slowly because the elements
// from the source go to each extraction operator ro... | java | @Deprecated
public SingleOutputStreamOperator<T> assignTimestamps(TimestampExtractor<T> extractor) {
// match parallelism to input, otherwise dop=1 sources could lead to some strange
// behaviour: the watermark will creep along very slowly because the elements
// from the source go to each extraction operator ro... | [
"@",
"Deprecated",
"public",
"SingleOutputStreamOperator",
"<",
"T",
">",
"assignTimestamps",
"(",
"TimestampExtractor",
"<",
"T",
">",
"extractor",
")",
"{",
"// match parallelism to input, otherwise dop=1 sources could lead to some strange",
"// behaviour: the watermark will cree... | Extracts a timestamp from an element and assigns it as the internal timestamp of that element.
The internal timestamps are, for example, used to to event-time window operations.
<p>If you know that the timestamps are strictly increasing you can use an
{@link AscendingTimestampExtractor}. Otherwise,
you should provide ... | [
"Extracts",
"a",
"timestamp",
"from",
"an",
"element",
"and",
"assigns",
"it",
"as",
"the",
"internal",
"timestamp",
"of",
"that",
"element",
".",
"The",
"internal",
"timestamps",
"are",
"for",
"example",
"used",
"to",
"to",
"event",
"-",
"time",
"window",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L841-L850 |
124,336 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.assignTimestampsAndWatermarks | public SingleOutputStreamOperator<T> assignTimestampsAndWatermarks(
AssignerWithPeriodicWatermarks<T> timestampAndWatermarkAssigner) {
// match parallelism to input, otherwise dop=1 sources could lead to some strange
// behaviour: the watermark will creep along very slowly because the elements
// from the sou... | java | public SingleOutputStreamOperator<T> assignTimestampsAndWatermarks(
AssignerWithPeriodicWatermarks<T> timestampAndWatermarkAssigner) {
// match parallelism to input, otherwise dop=1 sources could lead to some strange
// behaviour: the watermark will creep along very slowly because the elements
// from the sou... | [
"public",
"SingleOutputStreamOperator",
"<",
"T",
">",
"assignTimestampsAndWatermarks",
"(",
"AssignerWithPeriodicWatermarks",
"<",
"T",
">",
"timestampAndWatermarkAssigner",
")",
"{",
"// match parallelism to input, otherwise dop=1 sources could lead to some strange",
"// behaviour: t... | Assigns timestamps to the elements in the data stream and periodically creates
watermarks to signal event time progress.
<p>This method creates watermarks periodically (for example every second), based
on the watermarks indicated by the given watermark generator. Even when no new elements
in the stream arrive, the giv... | [
"Assigns",
"timestamps",
"to",
"the",
"elements",
"in",
"the",
"data",
"stream",
"and",
"periodically",
"creates",
"watermarks",
"to",
"signal",
"event",
"time",
"progress",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L883-L897 |
124,337 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.assignTimestampsAndWatermarks | public SingleOutputStreamOperator<T> assignTimestampsAndWatermarks(
AssignerWithPunctuatedWatermarks<T> timestampAndWatermarkAssigner) {
// match parallelism to input, otherwise dop=1 sources could lead to some strange
// behaviour: the watermark will creep along very slowly because the elements
// from the s... | java | public SingleOutputStreamOperator<T> assignTimestampsAndWatermarks(
AssignerWithPunctuatedWatermarks<T> timestampAndWatermarkAssigner) {
// match parallelism to input, otherwise dop=1 sources could lead to some strange
// behaviour: the watermark will creep along very slowly because the elements
// from the s... | [
"public",
"SingleOutputStreamOperator",
"<",
"T",
">",
"assignTimestampsAndWatermarks",
"(",
"AssignerWithPunctuatedWatermarks",
"<",
"T",
">",
"timestampAndWatermarkAssigner",
")",
"{",
"// match parallelism to input, otherwise dop=1 sources could lead to some strange",
"// behaviour:... | Assigns timestamps to the elements in the data stream and creates watermarks to
signal event time progress based on the elements themselves.
<p>This method creates watermarks based purely on stream elements. For each element
that is handled via {@link AssignerWithPunctuatedWatermarks#extractTimestamp(Object, long)},
t... | [
"Assigns",
"timestamps",
"to",
"the",
"elements",
"in",
"the",
"data",
"stream",
"and",
"creates",
"watermarks",
"to",
"signal",
"event",
"time",
"progress",
"based",
"on",
"the",
"elements",
"themselves",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L926-L940 |
124,338 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.writeAsCsv | @SuppressWarnings("unchecked")
@PublicEvolving
public <X extends Tuple> DataStreamSink<T> writeAsCsv(
String path,
WriteMode writeMode,
String rowDelimiter,
String fieldDelimiter) {
Preconditions.checkArgument(
getType().isTupleType(),
"The writeAsCsv() method can only be used on data streams of t... | java | @SuppressWarnings("unchecked")
@PublicEvolving
public <X extends Tuple> DataStreamSink<T> writeAsCsv(
String path,
WriteMode writeMode,
String rowDelimiter,
String fieldDelimiter) {
Preconditions.checkArgument(
getType().isTupleType(),
"The writeAsCsv() method can only be used on data streams of t... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"PublicEvolving",
"public",
"<",
"X",
"extends",
"Tuple",
">",
"DataStreamSink",
"<",
"T",
">",
"writeAsCsv",
"(",
"String",
"path",
",",
"WriteMode",
"writeMode",
",",
"String",
"rowDelimiter",
",",
"St... | Writes a DataStream to the file specified by the path parameter. The
writing is performed periodically every millis milliseconds.
<p>For every field of an element of the DataStream the result of {@link Object#toString()}
is written. This method can only be used on data streams of tuples.
@param path
the path pointing... | [
"Writes",
"a",
"DataStream",
"to",
"the",
"file",
"specified",
"by",
"the",
"path",
"parameter",
".",
"The",
"writing",
"is",
"performed",
"periodically",
"every",
"millis",
"milliseconds",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1104-L1125 |
124,339 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.writeUsingOutputFormat | @PublicEvolving
public DataStreamSink<T> writeUsingOutputFormat(OutputFormat<T> format) {
return addSink(new OutputFormatSinkFunction<>(format));
} | java | @PublicEvolving
public DataStreamSink<T> writeUsingOutputFormat(OutputFormat<T> format) {
return addSink(new OutputFormatSinkFunction<>(format));
} | [
"@",
"PublicEvolving",
"public",
"DataStreamSink",
"<",
"T",
">",
"writeUsingOutputFormat",
"(",
"OutputFormat",
"<",
"T",
">",
"format",
")",
"{",
"return",
"addSink",
"(",
"new",
"OutputFormatSinkFunction",
"<>",
"(",
"format",
")",
")",
";",
"}"
] | Writes the dataStream into an output, described by an OutputFormat.
<p>The output is not participating in Flink's checkpointing!
<p>For writing to a file system periodically, the use of the "flink-connector-filesystem"
is recommended.
@param format The output format
@return The closed DataStream | [
"Writes",
"the",
"dataStream",
"into",
"an",
"output",
"described",
"by",
"an",
"OutputFormat",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1157-L1160 |
124,340 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.transform | @PublicEvolving
public <R> SingleOutputStreamOperator<R> transform(String operatorName, TypeInformation<R> outTypeInfo, OneInputStreamOperator<T, R> operator) {
// read the output type of the input Transform to coax out errors about MissingTypeInfo
transformation.getOutputType();
OneInputTransformation<T, R> r... | java | @PublicEvolving
public <R> SingleOutputStreamOperator<R> transform(String operatorName, TypeInformation<R> outTypeInfo, OneInputStreamOperator<T, R> operator) {
// read the output type of the input Transform to coax out errors about MissingTypeInfo
transformation.getOutputType();
OneInputTransformation<T, R> r... | [
"@",
"PublicEvolving",
"public",
"<",
"R",
">",
"SingleOutputStreamOperator",
"<",
"R",
">",
"transform",
"(",
"String",
"operatorName",
",",
"TypeInformation",
"<",
"R",
">",
"outTypeInfo",
",",
"OneInputStreamOperator",
"<",
"T",
",",
"R",
">",
"operator",
"... | Method for passing user defined operators along with the type
information that will transform the DataStream.
@param operatorName
name of the operator, for logging purposes
@param outTypeInfo
the output type of the operator
@param operator
the object containing the transformation logic
@param <R>
type of the return st... | [
"Method",
"for",
"passing",
"user",
"defined",
"operators",
"along",
"with",
"the",
"type",
"information",
"that",
"will",
"transform",
"the",
"DataStream",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1176-L1195 |
124,341 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java | DataStream.setConnectionType | protected DataStream<T> setConnectionType(StreamPartitioner<T> partitioner) {
return new DataStream<>(this.getExecutionEnvironment(), new PartitionTransformation<>(this.getTransformation(), partitioner));
} | java | protected DataStream<T> setConnectionType(StreamPartitioner<T> partitioner) {
return new DataStream<>(this.getExecutionEnvironment(), new PartitionTransformation<>(this.getTransformation(), partitioner));
} | [
"protected",
"DataStream",
"<",
"T",
">",
"setConnectionType",
"(",
"StreamPartitioner",
"<",
"T",
">",
"partitioner",
")",
"{",
"return",
"new",
"DataStream",
"<>",
"(",
"this",
".",
"getExecutionEnvironment",
"(",
")",
",",
"new",
"PartitionTransformation",
"<... | Internal function for setting the partitioner for the DataStream.
@param partitioner
Partitioner to set.
@return The modified DataStream. | [
"Internal",
"function",
"for",
"setting",
"the",
"partitioner",
"for",
"the",
"DataStream",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L1204-L1206 |
124,342 | apache/flink | flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/statemachine/generator/EventsGenerator.java | EventsGenerator.next | public Event next(int minIp, int maxIp) {
final double p = rnd.nextDouble();
if (p * 1000 >= states.size()) {
// create a new state machine
final int nextIP = rnd.nextInt(maxIp - minIp) + minIp;
if (!states.containsKey(nextIP)) {
EventTypeAndState eventAndState = State.Initial.randomTransition(rnd);
... | java | public Event next(int minIp, int maxIp) {
final double p = rnd.nextDouble();
if (p * 1000 >= states.size()) {
// create a new state machine
final int nextIP = rnd.nextInt(maxIp - minIp) + minIp;
if (!states.containsKey(nextIP)) {
EventTypeAndState eventAndState = State.Initial.randomTransition(rnd);
... | [
"public",
"Event",
"next",
"(",
"int",
"minIp",
",",
"int",
"maxIp",
")",
"{",
"final",
"double",
"p",
"=",
"rnd",
".",
"nextDouble",
"(",
")",
";",
"if",
"(",
"p",
"*",
"1000",
">=",
"states",
".",
"size",
"(",
")",
")",
"{",
"// create a new stat... | Creates a new random event. This method randomly pick either
one of its currently running state machines, or start a new state machine for
a random IP address.
<p>With {@link #errorProb} probability, the generated event will be from an illegal state
transition of one of the currently running state machines.
@param mi... | [
"Creates",
"a",
"new",
"random",
"event",
".",
"This",
"method",
"randomly",
"pick",
"either",
"one",
"of",
"its",
"currently",
"running",
"state",
"machines",
"or",
"start",
"a",
"new",
"state",
"machine",
"for",
"a",
"random",
"IP",
"address",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/statemachine/generator/EventsGenerator.java#L83-L133 |
124,343 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/Hardware.java | Hardware.getSizeOfPhysicalMemoryForWindows | private static long getSizeOfPhysicalMemoryForWindows() {
BufferedReader bi = null;
try {
Process proc = Runtime.getRuntime().exec("wmic memorychip get capacity");
bi = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = bi.readLine();
if (line == null) {
return -1L;
... | java | private static long getSizeOfPhysicalMemoryForWindows() {
BufferedReader bi = null;
try {
Process proc = Runtime.getRuntime().exec("wmic memorychip get capacity");
bi = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = bi.readLine();
if (line == null) {
return -1L;
... | [
"private",
"static",
"long",
"getSizeOfPhysicalMemoryForWindows",
"(",
")",
"{",
"BufferedReader",
"bi",
"=",
"null",
";",
"try",
"{",
"Process",
"proc",
"=",
"Runtime",
".",
"getRuntime",
"(",
")",
".",
"exec",
"(",
"\"wmic memorychip get capacity\"",
")",
";",... | Returns the size of the physical memory in bytes on Windows.
@return the size of the physical memory in bytes or {@code -1}, if
the size could not be determined | [
"Returns",
"the",
"size",
"of",
"the",
"physical",
"memory",
"in",
"bytes",
"on",
"Windows",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/Hardware.java#L228-L267 |
124,344 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.map | public <R> MapOperator<T, R> map(MapFunction<T, R> mapper) {
if (mapper == null) {
throw new NullPointerException("Map function must not be null.");
}
String callLocation = Utils.getCallLocationName();
TypeInformation<R> resultType = TypeExtractor.getMapReturnTypes(mapper, getType(), callLocation, true);
... | java | public <R> MapOperator<T, R> map(MapFunction<T, R> mapper) {
if (mapper == null) {
throw new NullPointerException("Map function must not be null.");
}
String callLocation = Utils.getCallLocationName();
TypeInformation<R> resultType = TypeExtractor.getMapReturnTypes(mapper, getType(), callLocation, true);
... | [
"public",
"<",
"R",
">",
"MapOperator",
"<",
"T",
",",
"R",
">",
"map",
"(",
"MapFunction",
"<",
"T",
",",
"R",
">",
"mapper",
")",
"{",
"if",
"(",
"mapper",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Map function must not ... | Applies a Map transformation on this DataSet.
<p>The transformation calls a {@link org.apache.flink.api.common.functions.MapFunction} for each element of the DataSet.
Each MapFunction call returns exactly one element.
@param mapper The MapFunction that is called for each element of the DataSet.
@return A MapOperator ... | [
"Applies",
"a",
"Map",
"transformation",
"on",
"this",
"DataSet",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L210-L218 |
124,345 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.mapPartition | public <R> MapPartitionOperator<T, R> mapPartition(MapPartitionFunction<T, R> mapPartition) {
if (mapPartition == null) {
throw new NullPointerException("MapPartition function must not be null.");
}
String callLocation = Utils.getCallLocationName();
TypeInformation<R> resultType = TypeExtractor.getMapPartit... | java | public <R> MapPartitionOperator<T, R> mapPartition(MapPartitionFunction<T, R> mapPartition) {
if (mapPartition == null) {
throw new NullPointerException("MapPartition function must not be null.");
}
String callLocation = Utils.getCallLocationName();
TypeInformation<R> resultType = TypeExtractor.getMapPartit... | [
"public",
"<",
"R",
">",
"MapPartitionOperator",
"<",
"T",
",",
"R",
">",
"mapPartition",
"(",
"MapPartitionFunction",
"<",
"T",
",",
"R",
">",
"mapPartition",
")",
"{",
"if",
"(",
"mapPartition",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerExcepti... | Applies a Map-style operation to the entire partition of the data.
The function is called once per parallel partition of the data,
and the entire partition is available through the given Iterator.
The number of elements that each instance of the MapPartition function
sees is non deterministic and depends on the paralle... | [
"Applies",
"a",
"Map",
"-",
"style",
"operation",
"to",
"the",
"entire",
"partition",
"of",
"the",
"data",
".",
"The",
"function",
"is",
"called",
"once",
"per",
"parallel",
"partition",
"of",
"the",
"data",
"and",
"the",
"entire",
"partition",
"is",
"avai... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L237-L245 |
124,346 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.collect | public List<T> collect() throws Exception {
final String id = new AbstractID().toString();
final TypeSerializer<T> serializer = getType().createSerializer(getExecutionEnvironment().getConfig());
this.output(new Utils.CollectHelper<>(id, serializer)).name("collect()");
JobExecutionResult res = getExecutionEnvir... | java | public List<T> collect() throws Exception {
final String id = new AbstractID().toString();
final TypeSerializer<T> serializer = getType().createSerializer(getExecutionEnvironment().getConfig());
this.output(new Utils.CollectHelper<>(id, serializer)).name("collect()");
JobExecutionResult res = getExecutionEnvir... | [
"public",
"List",
"<",
"T",
">",
"collect",
"(",
")",
"throws",
"Exception",
"{",
"final",
"String",
"id",
"=",
"new",
"AbstractID",
"(",
")",
".",
"toString",
"(",
")",
";",
"final",
"TypeSerializer",
"<",
"T",
">",
"serializer",
"=",
"getType",
"(",
... | Convenience method to get the elements of a DataSet as a List.
As DataSet can contain a lot of data, this method should be used with caution.
@return A List containing the elements of the DataSet | [
"Convenience",
"method",
"to",
"get",
"the",
"elements",
"of",
"a",
"DataSet",
"as",
"a",
"List",
".",
"As",
"DataSet",
"can",
"contain",
"a",
"lot",
"of",
"data",
"this",
"method",
"should",
"be",
"used",
"with",
"caution",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L408-L427 |
124,347 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.minBy | @SuppressWarnings({ "unchecked", "rawtypes" })
public ReduceOperator<T> minBy(int... fields) {
if (!getType().isTupleType()) {
throw new InvalidProgramException("DataSet#minBy(int...) only works on Tuple types.");
}
return new ReduceOperator<>(this, new SelectByMinFunction(
(TupleTypeInfo) getType(), fie... | java | @SuppressWarnings({ "unchecked", "rawtypes" })
public ReduceOperator<T> minBy(int... fields) {
if (!getType().isTupleType()) {
throw new InvalidProgramException("DataSet#minBy(int...) only works on Tuple types.");
}
return new ReduceOperator<>(this, new SelectByMinFunction(
(TupleTypeInfo) getType(), fie... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"public",
"ReduceOperator",
"<",
"T",
">",
"minBy",
"(",
"int",
"...",
"fields",
")",
"{",
"if",
"(",
"!",
"getType",
"(",
")",
".",
"isTupleType",
"(",
")",
")",
"{",
... | Selects an element with minimum value.
<p>The minimum is computed over the specified fields in lexicographical order.
<p><strong>Example 1</strong>: Given a data set with elements <code>[0, 1], [1, 0]</code>, the
results will be:
<ul>
<li><code>minBy(0)</code>: <code>[0, 1]</code></li>
<li><code>minBy(1)</code>: <cod... | [
"Selects",
"an",
"element",
"with",
"minimum",
"value",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L522-L530 |
124,348 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.maxBy | @SuppressWarnings({ "unchecked", "rawtypes" })
public ReduceOperator<T> maxBy(int... fields) {
if (!getType().isTupleType()) {
throw new InvalidProgramException("DataSet#maxBy(int...) only works on Tuple types.");
}
return new ReduceOperator<>(this, new SelectByMaxFunction(
(TupleTypeInfo) getType(), fiel... | java | @SuppressWarnings({ "unchecked", "rawtypes" })
public ReduceOperator<T> maxBy(int... fields) {
if (!getType().isTupleType()) {
throw new InvalidProgramException("DataSet#maxBy(int...) only works on Tuple types.");
}
return new ReduceOperator<>(this, new SelectByMaxFunction(
(TupleTypeInfo) getType(), fiel... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"public",
"ReduceOperator",
"<",
"T",
">",
"maxBy",
"(",
"int",
"...",
"fields",
")",
"{",
"if",
"(",
"!",
"getType",
"(",
")",
".",
"isTupleType",
"(",
")",
")",
"{",
... | Selects an element with maximum value.
<p>The maximum is computed over the specified fields in lexicographical order.
<p><strong>Example 1</strong>: Given a data set with elements <code>[0, 1], [1, 0]</code>, the
results will be:
<ul>
<li><code>maxBy(0)</code>: <code>[1, 0]</code></li>
<li><code>maxBy(1)</code>: <cod... | [
"Selects",
"an",
"element",
"with",
"maximum",
"value",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L558-L566 |
124,349 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.coGroup | public <R> CoGroupOperator.CoGroupOperatorSets<T, R> coGroup(DataSet<R> other) {
return new CoGroupOperator.CoGroupOperatorSets<>(this, other);
} | java | public <R> CoGroupOperator.CoGroupOperatorSets<T, R> coGroup(DataSet<R> other) {
return new CoGroupOperator.CoGroupOperatorSets<>(this, other);
} | [
"public",
"<",
"R",
">",
"CoGroupOperator",
".",
"CoGroupOperatorSets",
"<",
"T",
",",
"R",
">",
"coGroup",
"(",
"DataSet",
"<",
"R",
">",
"other",
")",
"{",
"return",
"new",
"CoGroupOperator",
".",
"CoGroupOperatorSets",
"<>",
"(",
"this",
",",
"other",
... | Initiates a CoGroup transformation.
<p>A CoGroup transformation combines the elements of
two {@link DataSet DataSets} into one DataSet. It groups each DataSet individually on a key and
gives groups of both DataSets with equal keys together into a {@link org.apache.flink.api.common.functions.RichCoGroupFunction}.
If a ... | [
"Initiates",
"a",
"CoGroup",
"transformation",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1009-L1011 |
124,350 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.union | public UnionOperator<T> union(DataSet<T> other){
return new UnionOperator<>(this, other, Utils.getCallLocationName());
} | java | public UnionOperator<T> union(DataSet<T> other){
return new UnionOperator<>(this, other, Utils.getCallLocationName());
} | [
"public",
"UnionOperator",
"<",
"T",
">",
"union",
"(",
"DataSet",
"<",
"T",
">",
"other",
")",
"{",
"return",
"new",
"UnionOperator",
"<>",
"(",
"this",
",",
"other",
",",
"Utils",
".",
"getCallLocationName",
"(",
")",
")",
";",
"}"
] | Creates a union of this DataSet with an other DataSet. The other DataSet must be of the same data type.
@param other The other DataSet which is unioned with the current DataSet.
@return The resulting DataSet. | [
"Creates",
"a",
"union",
"of",
"this",
"DataSet",
"with",
"an",
"other",
"DataSet",
".",
"The",
"other",
"DataSet",
"must",
"be",
"of",
"the",
"same",
"data",
"type",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1241-L1243 |
124,351 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.partitionByHash | public PartitionOperator<T> partitionByHash(int... fields) {
return new PartitionOperator<>(this, PartitionMethod.HASH, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName());
} | java | public PartitionOperator<T> partitionByHash(int... fields) {
return new PartitionOperator<>(this, PartitionMethod.HASH, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName());
} | [
"public",
"PartitionOperator",
"<",
"T",
">",
"partitionByHash",
"(",
"int",
"...",
"fields",
")",
"{",
"return",
"new",
"PartitionOperator",
"<>",
"(",
"this",
",",
"PartitionMethod",
".",
"HASH",
",",
"new",
"Keys",
".",
"ExpressionKeys",
"<>",
"(",
"field... | Hash-partitions a DataSet on the specified key fields.
<p><b>Important:</b>This operation shuffles the whole DataSet over the network and can take significant amount of time.
@param fields The field indexes on which the DataSet is hash-partitioned.
@return The partitioned DataSet. | [
"Hash",
"-",
"partitions",
"a",
"DataSet",
"on",
"the",
"specified",
"key",
"fields",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1257-L1259 |
124,352 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.partitionByHash | public <K extends Comparable<K>> PartitionOperator<T> partitionByHash(KeySelector<T, K> keyExtractor) {
final TypeInformation<K> keyType = TypeExtractor.getKeySelectorTypes(keyExtractor, getType());
return new PartitionOperator<>(this, PartitionMethod.HASH, new Keys.SelectorFunctionKeys<>(clean(keyExtractor), this.... | java | public <K extends Comparable<K>> PartitionOperator<T> partitionByHash(KeySelector<T, K> keyExtractor) {
final TypeInformation<K> keyType = TypeExtractor.getKeySelectorTypes(keyExtractor, getType());
return new PartitionOperator<>(this, PartitionMethod.HASH, new Keys.SelectorFunctionKeys<>(clean(keyExtractor), this.... | [
"public",
"<",
"K",
"extends",
"Comparable",
"<",
"K",
">",
">",
"PartitionOperator",
"<",
"T",
">",
"partitionByHash",
"(",
"KeySelector",
"<",
"T",
",",
"K",
">",
"keyExtractor",
")",
"{",
"final",
"TypeInformation",
"<",
"K",
">",
"keyType",
"=",
"Typ... | Partitions a DataSet using the specified KeySelector.
<p><b>Important:</b>This operation shuffles the whole DataSet over the network and can take significant amount of time.
@param keyExtractor The KeyExtractor with which the DataSet is hash-partitioned.
@return The partitioned DataSet.
@see KeySelector | [
"Partitions",
"a",
"DataSet",
"using",
"the",
"specified",
"KeySelector",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1283-L1286 |
124,353 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.partitionByRange | public PartitionOperator<T> partitionByRange(int... fields) {
return new PartitionOperator<>(this, PartitionMethod.RANGE, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName());
} | java | public PartitionOperator<T> partitionByRange(int... fields) {
return new PartitionOperator<>(this, PartitionMethod.RANGE, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName());
} | [
"public",
"PartitionOperator",
"<",
"T",
">",
"partitionByRange",
"(",
"int",
"...",
"fields",
")",
"{",
"return",
"new",
"PartitionOperator",
"<>",
"(",
"this",
",",
"PartitionMethod",
".",
"RANGE",
",",
"new",
"Keys",
".",
"ExpressionKeys",
"<>",
"(",
"fie... | Range-partitions a DataSet on the specified key fields.
<p><b>Important:</b>This operation requires an extra pass over the DataSet to compute the range boundaries and
shuffles the whole DataSet over the network. This can take significant amount of time.
@param fields The field indexes on which the DataSet is range-pa... | [
"Range",
"-",
"partitions",
"a",
"DataSet",
"on",
"the",
"specified",
"key",
"fields",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1297-L1299 |
124,354 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.partitionCustom | public <K> PartitionOperator<T> partitionCustom(Partitioner<K> partitioner, int field) {
return new PartitionOperator<>(this, new Keys.ExpressionKeys<>(new int[] {field}, getType()), clean(partitioner), Utils.getCallLocationName());
} | java | public <K> PartitionOperator<T> partitionCustom(Partitioner<K> partitioner, int field) {
return new PartitionOperator<>(this, new Keys.ExpressionKeys<>(new int[] {field}, getType()), clean(partitioner), Utils.getCallLocationName());
} | [
"public",
"<",
"K",
">",
"PartitionOperator",
"<",
"T",
">",
"partitionCustom",
"(",
"Partitioner",
"<",
"K",
">",
"partitioner",
",",
"int",
"field",
")",
"{",
"return",
"new",
"PartitionOperator",
"<>",
"(",
"this",
",",
"new",
"Keys",
".",
"ExpressionKe... | Partitions a tuple DataSet on the specified key fields using a custom partitioner.
This method takes the key position to partition on, and a partitioner that accepts the key type.
<p>Note: This method works only on single field keys.
@param partitioner The partitioner to assign partitions to keys.
@param field The fi... | [
"Partitions",
"a",
"tuple",
"DataSet",
"on",
"the",
"specified",
"key",
"fields",
"using",
"a",
"custom",
"partitioner",
".",
"This",
"method",
"takes",
"the",
"key",
"position",
"to",
"partition",
"on",
"and",
"a",
"partitioner",
"that",
"accepts",
"the",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1340-L1342 |
124,355 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.partitionCustom | public <K extends Comparable<K>> PartitionOperator<T> partitionCustom(Partitioner<K> partitioner, KeySelector<T, K> keyExtractor) {
final TypeInformation<K> keyType = TypeExtractor.getKeySelectorTypes(keyExtractor, getType());
return new PartitionOperator<>(this, new Keys.SelectorFunctionKeys<>(keyExtractor, getTyp... | java | public <K extends Comparable<K>> PartitionOperator<T> partitionCustom(Partitioner<K> partitioner, KeySelector<T, K> keyExtractor) {
final TypeInformation<K> keyType = TypeExtractor.getKeySelectorTypes(keyExtractor, getType());
return new PartitionOperator<>(this, new Keys.SelectorFunctionKeys<>(keyExtractor, getTyp... | [
"public",
"<",
"K",
"extends",
"Comparable",
"<",
"K",
">",
">",
"PartitionOperator",
"<",
"T",
">",
"partitionCustom",
"(",
"Partitioner",
"<",
"K",
">",
"partitioner",
",",
"KeySelector",
"<",
"T",
",",
"K",
">",
"keyExtractor",
")",
"{",
"final",
"Typ... | Partitions a DataSet on the key returned by the selector, using a custom partitioner.
This method takes the key selector to get the key to partition on, and a partitioner that
accepts the key type.
<p>Note: This method works only on single field keys, i.e. the selector cannot return tuples
of fields.
@param partition... | [
"Partitions",
"a",
"DataSet",
"on",
"the",
"key",
"returned",
"by",
"the",
"selector",
"using",
"a",
"custom",
"partitioner",
".",
"This",
"method",
"takes",
"the",
"key",
"selector",
"to",
"get",
"the",
"key",
"to",
"partition",
"on",
"and",
"a",
"partiti... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1372-L1375 |
124,356 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/DataSet.java | DataSet.sortPartition | public <K> SortPartitionOperator<T> sortPartition(KeySelector<T, K> keyExtractor, Order order) {
final TypeInformation<K> keyType = TypeExtractor.getKeySelectorTypes(keyExtractor, getType());
return new SortPartitionOperator<>(this, new Keys.SelectorFunctionKeys<>(clean(keyExtractor), getType(), keyType), order, Ut... | java | public <K> SortPartitionOperator<T> sortPartition(KeySelector<T, K> keyExtractor, Order order) {
final TypeInformation<K> keyType = TypeExtractor.getKeySelectorTypes(keyExtractor, getType());
return new SortPartitionOperator<>(this, new Keys.SelectorFunctionKeys<>(clean(keyExtractor), getType(), keyType), order, Ut... | [
"public",
"<",
"K",
">",
"SortPartitionOperator",
"<",
"T",
">",
"sortPartition",
"(",
"KeySelector",
"<",
"T",
",",
"K",
">",
"keyExtractor",
",",
"Order",
"order",
")",
"{",
"final",
"TypeInformation",
"<",
"K",
">",
"keyType",
"=",
"TypeExtractor",
".",... | Locally sorts the partitions of the DataSet on the extracted key in the specified order.
The DataSet can be sorted on multiple values by returning a tuple from the KeySelector.
<p>Note that no additional sort keys can be appended to a KeySelector sort keys. To sort
the partitions by multiple values using KeySelector, ... | [
"Locally",
"sorts",
"the",
"partitions",
"of",
"the",
"DataSet",
"on",
"the",
"extracted",
"key",
"in",
"the",
"specified",
"order",
".",
"The",
"DataSet",
"can",
"be",
"sorted",
"on",
"multiple",
"values",
"by",
"returning",
"a",
"tuple",
"from",
"the",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1430-L1433 |
124,357 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java | StateDescriptor.getDefaultValue | public T getDefaultValue() {
if (defaultValue != null) {
if (serializer != null) {
return serializer.copy(defaultValue);
} else {
throw new IllegalStateException("Serializer not yet initialized.");
}
} else {
return null;
}
} | java | public T getDefaultValue() {
if (defaultValue != null) {
if (serializer != null) {
return serializer.copy(defaultValue);
} else {
throw new IllegalStateException("Serializer not yet initialized.");
}
} else {
return null;
}
} | [
"public",
"T",
"getDefaultValue",
"(",
")",
"{",
"if",
"(",
"defaultValue",
"!=",
"null",
")",
"{",
"if",
"(",
"serializer",
"!=",
"null",
")",
"{",
"return",
"serializer",
".",
"copy",
"(",
"defaultValue",
")",
";",
"}",
"else",
"{",
"throw",
"new",
... | Returns the default value. | [
"Returns",
"the",
"default",
"value",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L176-L186 |
124,358 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java | StateDescriptor.setQueryable | public void setQueryable(String queryableStateName) {
Preconditions.checkArgument(
ttlConfig.getUpdateType() == StateTtlConfig.UpdateType.Disabled,
"Queryable state is currently not supported with TTL");
if (this.queryableStateName == null) {
this.queryableStateName = Preconditions.checkNotNull(queryableSt... | java | public void setQueryable(String queryableStateName) {
Preconditions.checkArgument(
ttlConfig.getUpdateType() == StateTtlConfig.UpdateType.Disabled,
"Queryable state is currently not supported with TTL");
if (this.queryableStateName == null) {
this.queryableStateName = Preconditions.checkNotNull(queryableSt... | [
"public",
"void",
"setQueryable",
"(",
"String",
"queryableStateName",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"ttlConfig",
".",
"getUpdateType",
"(",
")",
"==",
"StateTtlConfig",
".",
"UpdateType",
".",
"Disabled",
",",
"\"Queryable state is currently n... | Sets the name for queries of state created from this descriptor.
<p>If a name is set, the created state will be published for queries
during runtime. The name needs to be unique per job. If there is another
state instance published under the same name, the job will fail during runtime.
@param queryableStateName State... | [
"Sets",
"the",
"name",
"for",
"queries",
"of",
"state",
"created",
"from",
"this",
"descriptor",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L211-L220 |
124,359 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java | StateDescriptor.initializeSerializerUnlessSet | public void initializeSerializerUnlessSet(ExecutionConfig executionConfig) {
if (serializer == null) {
checkState(typeInfo != null, "no serializer and no type info");
// instantiate the serializer
serializer = typeInfo.createSerializer(executionConfig);
// we can drop the type info now, no longer needed... | java | public void initializeSerializerUnlessSet(ExecutionConfig executionConfig) {
if (serializer == null) {
checkState(typeInfo != null, "no serializer and no type info");
// instantiate the serializer
serializer = typeInfo.createSerializer(executionConfig);
// we can drop the type info now, no longer needed... | [
"public",
"void",
"initializeSerializerUnlessSet",
"(",
"ExecutionConfig",
"executionConfig",
")",
"{",
"if",
"(",
"serializer",
"==",
"null",
")",
"{",
"checkState",
"(",
"typeInfo",
"!=",
"null",
",",
"\"no serializer and no type info\"",
")",
";",
"// instantiate t... | Initializes the serializer, unless it has been initialized before.
@param executionConfig The execution config to use when creating the serializer. | [
"Initializes",
"the",
"serializer",
"unless",
"it",
"has",
"been",
"initialized",
"before",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L283-L293 |
124,360 | apache/flink | flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java | JDBCInputFormat.nextRecord | @Override
public Row nextRecord(Row row) throws IOException {
try {
if (!hasNext) {
return null;
}
for (int pos = 0; pos < row.getArity(); pos++) {
row.setField(pos, resultSet.getObject(pos + 1));
}
//update hasNext after we've read the record
hasNext = resultSet.next();
return row;
} ... | java | @Override
public Row nextRecord(Row row) throws IOException {
try {
if (!hasNext) {
return null;
}
for (int pos = 0; pos < row.getArity(); pos++) {
row.setField(pos, resultSet.getObject(pos + 1));
}
//update hasNext after we've read the record
hasNext = resultSet.next();
return row;
} ... | [
"@",
"Override",
"public",
"Row",
"nextRecord",
"(",
"Row",
"row",
")",
"throws",
"IOException",
"{",
"try",
"{",
"if",
"(",
"!",
"hasNext",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"pos",
"=",
"0",
";",
"pos",
"<",
"row",
".",
"g... | Stores the next resultSet row in a tuple.
@param row row to be reused.
@return row containing next {@link Row}
@throws java.io.IOException | [
"Stores",
"the",
"next",
"resultSet",
"row",
"in",
"a",
"tuple",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java#L289-L306 |
124,361 | apache/flink | flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java | GenericInMemoryCatalog.validatePartitionSpec | private CatalogTable validatePartitionSpec(ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
throws TableNotExistException, TableNotPartitionedException, PartitionSpecInvalidException {
CatalogTable table = validatePartitionedTable(tablePath);
List<String> partitionKeys = table.getPartitionKeys();
Map... | java | private CatalogTable validatePartitionSpec(ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
throws TableNotExistException, TableNotPartitionedException, PartitionSpecInvalidException {
CatalogTable table = validatePartitionedTable(tablePath);
List<String> partitionKeys = table.getPartitionKeys();
Map... | [
"private",
"CatalogTable",
"validatePartitionSpec",
"(",
"ObjectPath",
"tablePath",
",",
"CatalogPartitionSpec",
"partitionSpec",
")",
"throws",
"TableNotExistException",
",",
"TableNotPartitionedException",
",",
"PartitionSpecInvalidException",
"{",
"CatalogTable",
"table",
"=... | Validate the partitioned table and partitionSpec. | [
"Validate",
"the",
"partitioned",
"table",
"and",
"partitionSpec",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java#L465-L488 |
124,362 | apache/flink | flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java | GenericInMemoryCatalog.validatePartitionedTable | private CatalogTable validatePartitionedTable(ObjectPath tablePath)
throws TableNotExistException, TableNotPartitionedException {
CatalogBaseTable baseTable = getTable(tablePath);
if (!(baseTable instanceof CatalogTable)) {
throw new CatalogException(
String.format("%s in Catalog %s is not a CatalogTable... | java | private CatalogTable validatePartitionedTable(ObjectPath tablePath)
throws TableNotExistException, TableNotPartitionedException {
CatalogBaseTable baseTable = getTable(tablePath);
if (!(baseTable instanceof CatalogTable)) {
throw new CatalogException(
String.format("%s in Catalog %s is not a CatalogTable... | [
"private",
"CatalogTable",
"validatePartitionedTable",
"(",
"ObjectPath",
"tablePath",
")",
"throws",
"TableNotExistException",
",",
"TableNotPartitionedException",
"{",
"CatalogBaseTable",
"baseTable",
"=",
"getTable",
"(",
"tablePath",
")",
";",
"if",
"(",
"!",
"(",
... | Validate the partitioned table. | [
"Validate",
"the",
"partitioned",
"table",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java#L493-L510 |
124,363 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultSubpartition.java | ResultSubpartition.increaseBuffersInBacklog | protected void increaseBuffersInBacklog(BufferConsumer buffer) {
assert Thread.holdsLock(buffers);
if (buffer != null && buffer.isBuffer()) {
buffersInBacklog++;
}
} | java | protected void increaseBuffersInBacklog(BufferConsumer buffer) {
assert Thread.holdsLock(buffers);
if (buffer != null && buffer.isBuffer()) {
buffersInBacklog++;
}
} | [
"protected",
"void",
"increaseBuffersInBacklog",
"(",
"BufferConsumer",
"buffer",
")",
"{",
"assert",
"Thread",
".",
"holdsLock",
"(",
"buffers",
")",
";",
"if",
"(",
"buffer",
"!=",
"null",
"&&",
"buffer",
".",
"isBuffer",
"(",
")",
")",
"{",
"buffersInBack... | Increases the number of non-event buffers by one after adding a non-event
buffer into this subpartition. | [
"Increases",
"the",
"number",
"of",
"non",
"-",
"event",
"buffers",
"by",
"one",
"after",
"adding",
"a",
"non",
"-",
"event",
"buffer",
"into",
"this",
"subpartition",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultSubpartition.java#L161-L167 |
124,364 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.lookupSelectHints | void lookupSelectHints(
SqlSelect select,
SqlParserPos pos,
Collection<SqlMoniker> hintList) {
IdInfo info = idPositions.get(pos.toString());
if ((info == null) || (info.scope == null)) {
SqlNode fromNode = select.getFrom();
final SqlValidatorScope fromScope = getFromScope(select);
lookupFromHints(fr... | java | void lookupSelectHints(
SqlSelect select,
SqlParserPos pos,
Collection<SqlMoniker> hintList) {
IdInfo info = idPositions.get(pos.toString());
if ((info == null) || (info.scope == null)) {
SqlNode fromNode = select.getFrom();
final SqlValidatorScope fromScope = getFromScope(select);
lookupFromHints(fr... | [
"void",
"lookupSelectHints",
"(",
"SqlSelect",
"select",
",",
"SqlParserPos",
"pos",
",",
"Collection",
"<",
"SqlMoniker",
">",
"hintList",
")",
"{",
"IdInfo",
"info",
"=",
"idPositions",
".",
"get",
"(",
"pos",
".",
"toString",
"(",
")",
")",
";",
"if",
... | Looks up completion hints for a syntactically correct select SQL that has
been parsed into an expression tree.
@param select the Select node of the parsed expression tree
@param pos indicates the position in the sql statement we want to get
completion hints for
@param hintList list of {@link SqlMoniker} (sql id... | [
"Looks",
"up",
"completion",
"hints",
"for",
"a",
"syntactically",
"correct",
"select",
"SQL",
"that",
"has",
"been",
"parsed",
"into",
"an",
"expression",
"tree",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L686-L699 |
124,365 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.lookupNameCompletionHints | public final void lookupNameCompletionHints(
SqlValidatorScope scope,
List<String> names,
SqlParserPos pos,
Collection<SqlMoniker> hintList) {
// Remove the last part of name - it is a dummy
List<String> subNames = Util.skipLast(names);
if (subNames.size() > 0) {
// If there's a prefix, resolve it to ... | java | public final void lookupNameCompletionHints(
SqlValidatorScope scope,
List<String> names,
SqlParserPos pos,
Collection<SqlMoniker> hintList) {
// Remove the last part of name - it is a dummy
List<String> subNames = Util.skipLast(names);
if (subNames.size() > 0) {
// If there's a prefix, resolve it to ... | [
"public",
"final",
"void",
"lookupNameCompletionHints",
"(",
"SqlValidatorScope",
"scope",
",",
"List",
"<",
"String",
">",
"names",
",",
"SqlParserPos",
"pos",
",",
"Collection",
"<",
"SqlMoniker",
">",
"hintList",
")",
"{",
"// Remove the last part of name - it is a... | Populates a list of all the valid alternatives for an identifier.
@param scope Validation scope
@param names Components of the identifier
@param pos position
@param hintList a list of valid options | [
"Populates",
"a",
"list",
"of",
"all",
"the",
"valid",
"alternatives",
"for",
"an",
"identifier",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L789-L853 |
124,366 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateNamespace | protected void validateNamespace(final SqlValidatorNamespace namespace,
RelDataType targetRowType) {
namespace.validate(targetRowType);
if (namespace.getNode() != null) {
setValidatedNodeType(namespace.getNode(), namespace.getType());
}
} | java | protected void validateNamespace(final SqlValidatorNamespace namespace,
RelDataType targetRowType) {
namespace.validate(targetRowType);
if (namespace.getNode() != null) {
setValidatedNodeType(namespace.getNode(), namespace.getType());
}
} | [
"protected",
"void",
"validateNamespace",
"(",
"final",
"SqlValidatorNamespace",
"namespace",
",",
"RelDataType",
"targetRowType",
")",
"{",
"namespace",
".",
"validate",
"(",
"targetRowType",
")",
";",
"if",
"(",
"namespace",
".",
"getNode",
"(",
")",
"!=",
"nu... | Validates a namespace.
@param namespace Namespace
@param targetRowType Desired row type, must not be null, may be the data
type 'unknown'. | [
"Validates",
"a",
"namespace",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L980-L986 |
124,367 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.createSourceSelectForUpdate | protected SqlSelect createSourceSelectForUpdate(SqlUpdate call) {
final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO);
selectList.add(SqlIdentifier.star(SqlParserPos.ZERO));
int ordinal = 0;
for (SqlNode exp : call.getSourceExpressionList()) {
// Force unique aliases to avoid a duplicate for Y ... | java | protected SqlSelect createSourceSelectForUpdate(SqlUpdate call) {
final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO);
selectList.add(SqlIdentifier.star(SqlParserPos.ZERO));
int ordinal = 0;
for (SqlNode exp : call.getSourceExpressionList()) {
// Force unique aliases to avoid a duplicate for Y ... | [
"protected",
"SqlSelect",
"createSourceSelectForUpdate",
"(",
"SqlUpdate",
"call",
")",
"{",
"final",
"SqlNodeList",
"selectList",
"=",
"new",
"SqlNodeList",
"(",
"SqlParserPos",
".",
"ZERO",
")",
";",
"selectList",
".",
"add",
"(",
"SqlIdentifier",
".",
"star",
... | Creates the SELECT statement that putatively feeds rows into an UPDATE
statement to be updated.
@param call Call to the UPDATE operator
@return select statement | [
"Creates",
"the",
"SELECT",
"statement",
"that",
"putatively",
"feeds",
"rows",
"into",
"an",
"UPDATE",
"statement",
"to",
"be",
"updated",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1484-L1504 |
124,368 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.createSourceSelectForDelete | protected SqlSelect createSourceSelectForDelete(SqlDelete call) {
final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO);
selectList.add(SqlIdentifier.star(SqlParserPos.ZERO));
SqlNode sourceTable = call.getTargetTable();
if (call.getAlias() != null) {
sourceTable =
SqlValidatorUtil.addAlias(
... | java | protected SqlSelect createSourceSelectForDelete(SqlDelete call) {
final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO);
selectList.add(SqlIdentifier.star(SqlParserPos.ZERO));
SqlNode sourceTable = call.getTargetTable();
if (call.getAlias() != null) {
sourceTable =
SqlValidatorUtil.addAlias(
... | [
"protected",
"SqlSelect",
"createSourceSelectForDelete",
"(",
"SqlDelete",
"call",
")",
"{",
"final",
"SqlNodeList",
"selectList",
"=",
"new",
"SqlNodeList",
"(",
"SqlParserPos",
".",
"ZERO",
")",
";",
"selectList",
".",
"add",
"(",
"SqlIdentifier",
".",
"star",
... | Creates the SELECT statement that putatively feeds rows into a DELETE
statement to be deleted.
@param call Call to the DELETE operator
@return select statement | [
"Creates",
"the",
"SELECT",
"statement",
"that",
"putatively",
"feeds",
"rows",
"into",
"a",
"DELETE",
"statement",
"to",
"be",
"deleted",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1513-L1525 |
124,369 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.getTableConstructorRowType | RelDataType getTableConstructorRowType(
SqlCall values,
SqlValidatorScope scope) {
final List<SqlNode> rows = values.getOperandList();
assert rows.size() >= 1;
final List<RelDataType> rowTypes = new ArrayList<>();
for (final SqlNode row : rows) {
assert row.getKind() == SqlKind.ROW;
SqlCall rowConstru... | java | RelDataType getTableConstructorRowType(
SqlCall values,
SqlValidatorScope scope) {
final List<SqlNode> rows = values.getOperandList();
assert rows.size() >= 1;
final List<RelDataType> rowTypes = new ArrayList<>();
for (final SqlNode row : rows) {
assert row.getKind() == SqlKind.ROW;
SqlCall rowConstru... | [
"RelDataType",
"getTableConstructorRowType",
"(",
"SqlCall",
"values",
",",
"SqlValidatorScope",
"scope",
")",
"{",
"final",
"List",
"<",
"SqlNode",
">",
"rows",
"=",
"values",
".",
"getOperandList",
"(",
")",
";",
"assert",
"rows",
".",
"size",
"(",
")",
">... | Returns null if there is no common type. E.g. if the rows have a
different number of columns. | [
"Returns",
"null",
"if",
"there",
"is",
"no",
"common",
"type",
".",
"E",
".",
"g",
".",
"if",
"the",
"rows",
"have",
"a",
"different",
"number",
"of",
"columns",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1531-L1559 |
124,370 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.deriveTypeImpl | RelDataType deriveTypeImpl(
SqlValidatorScope scope,
SqlNode operand) {
DeriveTypeVisitor v = new DeriveTypeVisitor(scope);
final RelDataType type = operand.accept(v);
return Objects.requireNonNull(scope.nullifyType(operand, type));
} | java | RelDataType deriveTypeImpl(
SqlValidatorScope scope,
SqlNode operand) {
DeriveTypeVisitor v = new DeriveTypeVisitor(scope);
final RelDataType type = operand.accept(v);
return Objects.requireNonNull(scope.nullifyType(operand, type));
} | [
"RelDataType",
"deriveTypeImpl",
"(",
"SqlValidatorScope",
"scope",
",",
"SqlNode",
"operand",
")",
"{",
"DeriveTypeVisitor",
"v",
"=",
"new",
"DeriveTypeVisitor",
"(",
"scope",
")",
";",
"final",
"RelDataType",
"type",
"=",
"operand",
".",
"accept",
"(",
"v",
... | Derives the type of a node, never null. | [
"Derives",
"the",
"type",
"of",
"a",
"node",
"never",
"null",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1640-L1646 |
124,371 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.addToSelectList | protected void addToSelectList(
List<SqlNode> list,
Set<String> aliases,
List<Map.Entry<String, RelDataType>> fieldList,
SqlNode exp,
SqlValidatorScope scope,
final boolean includeSystemVars) {
String alias = SqlValidatorUtil.getAlias(exp, -1);
String uniqueAlias =
SqlValidatorUtil.uniquify(
alia... | java | protected void addToSelectList(
List<SqlNode> list,
Set<String> aliases,
List<Map.Entry<String, RelDataType>> fieldList,
SqlNode exp,
SqlValidatorScope scope,
final boolean includeSystemVars) {
String alias = SqlValidatorUtil.getAlias(exp, -1);
String uniqueAlias =
SqlValidatorUtil.uniquify(
alia... | [
"protected",
"void",
"addToSelectList",
"(",
"List",
"<",
"SqlNode",
">",
"list",
",",
"Set",
"<",
"String",
">",
"aliases",
",",
"List",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"RelDataType",
">",
">",
"fieldList",
",",
"SqlNode",
"exp",
",",
"S... | Adds an expression to a select list, ensuring that its alias does not
clash with any existing expressions on the list. | [
"Adds",
"an",
"expression",
"to",
"a",
"select",
"list",
"ensuring",
"that",
"its",
"alias",
"does",
"not",
"clash",
"with",
"any",
"existing",
"expressions",
"on",
"the",
"list",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1836-L1852 |
124,372 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.registerNamespace | protected void registerNamespace(
SqlValidatorScope usingScope,
String alias,
SqlValidatorNamespace ns,
boolean forceNullable) {
namespaces.put(ns.getNode(), ns);
if (usingScope != null) {
usingScope.addChild(ns, alias, forceNullable);
}
} | java | protected void registerNamespace(
SqlValidatorScope usingScope,
String alias,
SqlValidatorNamespace ns,
boolean forceNullable) {
namespaces.put(ns.getNode(), ns);
if (usingScope != null) {
usingScope.addChild(ns, alias, forceNullable);
}
} | [
"protected",
"void",
"registerNamespace",
"(",
"SqlValidatorScope",
"usingScope",
",",
"String",
"alias",
",",
"SqlValidatorNamespace",
"ns",
",",
"boolean",
"forceNullable",
")",
"{",
"namespaces",
".",
"put",
"(",
"ns",
".",
"getNode",
"(",
")",
",",
"ns",
"... | Registers a new namespace, and adds it as a child of its parent scope.
Derived class can override this method to tinker with namespaces as they
are created.
@param usingScope Parent scope (which will want to look for things in
this namespace)
@param alias Alias by which parent will refer to this namespace
@... | [
"Registers",
"a",
"new",
"namespace",
"and",
"adds",
"it",
"as",
"a",
"child",
"of",
"its",
"parent",
"scope",
".",
"Derived",
"class",
"can",
"override",
"this",
"method",
"to",
"tinker",
"with",
"namespaces",
"as",
"they",
"are",
"created",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1939-L1948 |
124,373 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.getAgg | private SqlNode getAgg(SqlSelect select) {
final SelectScope selectScope = getRawSelectScope(select);
if (selectScope != null) {
final List<SqlNode> selectList = selectScope.getExpandedSelectList();
if (selectList != null) {
return aggFinder.findAgg(selectList);
}
}
return aggFinder.findAgg(select.... | java | private SqlNode getAgg(SqlSelect select) {
final SelectScope selectScope = getRawSelectScope(select);
if (selectScope != null) {
final List<SqlNode> selectList = selectScope.getExpandedSelectList();
if (selectList != null) {
return aggFinder.findAgg(selectList);
}
}
return aggFinder.findAgg(select.... | [
"private",
"SqlNode",
"getAgg",
"(",
"SqlSelect",
"select",
")",
"{",
"final",
"SelectScope",
"selectScope",
"=",
"getRawSelectScope",
"(",
"select",
")",
";",
"if",
"(",
"selectScope",
"!=",
"null",
")",
"{",
"final",
"List",
"<",
"SqlNode",
">",
"selectLis... | If there is at least one call to an aggregate function, returns the
first. | [
"If",
"there",
"is",
"at",
"least",
"one",
"call",
"to",
"an",
"aggregate",
"function",
"returns",
"the",
"first",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2789-L2798 |
124,374 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.registerOperandSubQueries | private void registerOperandSubQueries(
SqlValidatorScope parentScope,
SqlCall call,
int operandOrdinal) {
SqlNode operand = call.operand(operandOrdinal);
if (operand == null) {
return;
}
if (operand.getKind().belongsTo(SqlKind.QUERY)
&& call.getOperator().argumentMustBeScalar(operandOrdinal)) {
... | java | private void registerOperandSubQueries(
SqlValidatorScope parentScope,
SqlCall call,
int operandOrdinal) {
SqlNode operand = call.operand(operandOrdinal);
if (operand == null) {
return;
}
if (operand.getKind().belongsTo(SqlKind.QUERY)
&& call.getOperator().argumentMustBeScalar(operandOrdinal)) {
... | [
"private",
"void",
"registerOperandSubQueries",
"(",
"SqlValidatorScope",
"parentScope",
",",
"SqlCall",
"call",
",",
"int",
"operandOrdinal",
")",
"{",
"SqlNode",
"operand",
"=",
"call",
".",
"operand",
"(",
"operandOrdinal",
")",
";",
"if",
"(",
"operand",
"==... | Registers any sub-queries inside a given call operand, and converts the
operand to a scalar sub-query if the operator requires it.
@param parentScope Parent scope
@param call Call
@param operandOrdinal Ordinal of operand within call
@see SqlOperator#argumentMustBeScalar(int) | [
"Registers",
"any",
"sub",
"-",
"queries",
"inside",
"a",
"given",
"call",
"operand",
"and",
"converts",
"the",
"operand",
"to",
"a",
"scalar",
"sub",
"-",
"query",
"if",
"the",
"operator",
"requires",
"it",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2856-L2873 |
124,375 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateNoAggs | private void validateNoAggs(AggFinder aggFinder, SqlNode node,
String clause) {
final SqlCall agg = aggFinder.findAgg(node);
if (agg == null) {
return;
}
final SqlOperator op = agg.getOperator();
if (op == SqlStdOperatorTable.OVER) {
throw newValidationError(agg,
RESOURCE.windowedAggregateIllegalI... | java | private void validateNoAggs(AggFinder aggFinder, SqlNode node,
String clause) {
final SqlCall agg = aggFinder.findAgg(node);
if (agg == null) {
return;
}
final SqlOperator op = agg.getOperator();
if (op == SqlStdOperatorTable.OVER) {
throw newValidationError(agg,
RESOURCE.windowedAggregateIllegalI... | [
"private",
"void",
"validateNoAggs",
"(",
"AggFinder",
"aggFinder",
",",
"SqlNode",
"node",
",",
"String",
"clause",
")",
"{",
"final",
"SqlCall",
"agg",
"=",
"aggFinder",
".",
"findAgg",
"(",
"node",
")",
";",
"if",
"(",
"agg",
"==",
"null",
")",
"{",
... | Throws an error if there is an aggregate or windowed aggregate in the
given clause.
@param aggFinder Finder for the particular kind(s) of aggregate function
@param node Parse tree
@param clause Name of clause: "WHERE", "GROUP BY", "ON" | [
"Throws",
"an",
"error",
"if",
"there",
"is",
"an",
"aggregate",
"or",
"windowed",
"aggregate",
"in",
"the",
"given",
"clause",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3208-L3225 |
124,376 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateSelect | protected void validateSelect(
SqlSelect select,
RelDataType targetRowType) {
assert targetRowType != null;
// Namespace is either a select namespace or a wrapper around one.
final SelectNamespace ns =
getNamespace(select).unwrap(SelectNamespace.class);
// Its rowtype is null, meaning it hasn't been val... | java | protected void validateSelect(
SqlSelect select,
RelDataType targetRowType) {
assert targetRowType != null;
// Namespace is either a select namespace or a wrapper around one.
final SelectNamespace ns =
getNamespace(select).unwrap(SelectNamespace.class);
// Its rowtype is null, meaning it hasn't been val... | [
"protected",
"void",
"validateSelect",
"(",
"SqlSelect",
"select",
",",
"RelDataType",
"targetRowType",
")",
"{",
"assert",
"targetRowType",
"!=",
"null",
";",
"// Namespace is either a select namespace or a wrapper around one.",
"final",
"SelectNamespace",
"ns",
"=",
"getN... | Validates a SELECT statement.
@param select Select statement
@param targetRowType Desired row type, must not be null, may be the data
type 'unknown'. | [
"Validates",
"a",
"SELECT",
"statement",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3252-L3336 |
124,377 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.isRolledUpColumnAllowedInAgg | private boolean isRolledUpColumnAllowedInAgg(SqlIdentifier identifier, SqlValidatorScope scope,
SqlCall aggCall, SqlNode parent) {
Pair<String, String> pair = findTableColumnPair(identifier, scope);
if (pair == null) {
return true;
}
String tableAlias = pair.left;
String columnName = pair.right;
Tab... | java | private boolean isRolledUpColumnAllowedInAgg(SqlIdentifier identifier, SqlValidatorScope scope,
SqlCall aggCall, SqlNode parent) {
Pair<String, String> pair = findTableColumnPair(identifier, scope);
if (pair == null) {
return true;
}
String tableAlias = pair.left;
String columnName = pair.right;
Tab... | [
"private",
"boolean",
"isRolledUpColumnAllowedInAgg",
"(",
"SqlIdentifier",
"identifier",
",",
"SqlValidatorScope",
"scope",
",",
"SqlCall",
"aggCall",
",",
"SqlNode",
"parent",
")",
"{",
"Pair",
"<",
"String",
",",
"String",
">",
"pair",
"=",
"findTableColumnPair",... | Returns true iff the given column is valid inside the given aggCall. | [
"Returns",
"true",
"iff",
"the",
"given",
"column",
"is",
"valid",
"inside",
"the",
"given",
"aggCall",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3456-L3473 |
124,378 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.isRolledUpColumn | private boolean isRolledUpColumn(SqlIdentifier identifier, SqlValidatorScope scope) {
Pair<String, String> pair = findTableColumnPair(identifier, scope);
if (pair == null) {
return false;
}
String tableAlias = pair.left;
String columnName = pair.right;
Table table = findTable(tableAlias);
if (table ... | java | private boolean isRolledUpColumn(SqlIdentifier identifier, SqlValidatorScope scope) {
Pair<String, String> pair = findTableColumnPair(identifier, scope);
if (pair == null) {
return false;
}
String tableAlias = pair.left;
String columnName = pair.right;
Table table = findTable(tableAlias);
if (table ... | [
"private",
"boolean",
"isRolledUpColumn",
"(",
"SqlIdentifier",
"identifier",
",",
"SqlValidatorScope",
"scope",
")",
"{",
"Pair",
"<",
"String",
",",
"String",
">",
"pair",
"=",
"findTableColumnPair",
"(",
"identifier",
",",
"scope",
")",
";",
"if",
"(",
"pai... | Returns true iff the given column is actually rolled up. | [
"Returns",
"true",
"iff",
"the",
"given",
"column",
"is",
"actually",
"rolled",
"up",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3477-L3492 |
124,379 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateModality | private void validateModality(SqlNode query) {
final SqlModality modality = deduceModality(query);
if (query instanceof SqlSelect) {
final SqlSelect select = (SqlSelect) query;
validateModality(select, modality, true);
} else if (query.getKind() == SqlKind.VALUES) {
switch (modality) {
case STREAM:
... | java | private void validateModality(SqlNode query) {
final SqlModality modality = deduceModality(query);
if (query instanceof SqlSelect) {
final SqlSelect select = (SqlSelect) query;
validateModality(select, modality, true);
} else if (query.getKind() == SqlKind.VALUES) {
switch (modality) {
case STREAM:
... | [
"private",
"void",
"validateModality",
"(",
"SqlNode",
"query",
")",
"{",
"final",
"SqlModality",
"modality",
"=",
"deduceModality",
"(",
"query",
")",
";",
"if",
"(",
"query",
"instanceof",
"SqlSelect",
")",
"{",
"final",
"SqlSelect",
"select",
"=",
"(",
"S... | Validates that a query can deliver the modality it promises. Only called
on the top-most SELECT or set operator in the tree. | [
"Validates",
"that",
"a",
"query",
"can",
"deliver",
"the",
"modality",
"it",
"promises",
".",
"Only",
"called",
"on",
"the",
"top",
"-",
"most",
"SELECT",
"or",
"set",
"operator",
"in",
"the",
"tree",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3550-L3571 |
124,380 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.deduceModality | private SqlModality deduceModality(SqlNode query) {
if (query instanceof SqlSelect) {
SqlSelect select = (SqlSelect) query;
return select.getModifierNode(SqlSelectKeyword.STREAM) != null
? SqlModality.STREAM
: SqlModality.RELATION;
} else if (query.getKind() == SqlKind.VALUES) {
return SqlModality.... | java | private SqlModality deduceModality(SqlNode query) {
if (query instanceof SqlSelect) {
SqlSelect select = (SqlSelect) query;
return select.getModifierNode(SqlSelectKeyword.STREAM) != null
? SqlModality.STREAM
: SqlModality.RELATION;
} else if (query.getKind() == SqlKind.VALUES) {
return SqlModality.... | [
"private",
"SqlModality",
"deduceModality",
"(",
"SqlNode",
"query",
")",
"{",
"if",
"(",
"query",
"instanceof",
"SqlSelect",
")",
"{",
"SqlSelect",
"select",
"=",
"(",
"SqlSelect",
")",
"query",
";",
"return",
"select",
".",
"getModifierNode",
"(",
"SqlSelect... | Return the intended modality of a SELECT or set-op. | [
"Return",
"the",
"intended",
"modality",
"of",
"a",
"SELECT",
"or",
"set",
"-",
"op",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3574-L3587 |
124,381 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.hasSortedPrefix | private boolean hasSortedPrefix(SelectScope scope, SqlNodeList orderList) {
return isSortCompatible(scope, orderList.get(0), false);
} | java | private boolean hasSortedPrefix(SelectScope scope, SqlNodeList orderList) {
return isSortCompatible(scope, orderList.get(0), false);
} | [
"private",
"boolean",
"hasSortedPrefix",
"(",
"SelectScope",
"scope",
",",
"SqlNodeList",
"orderList",
")",
"{",
"return",
"isSortCompatible",
"(",
"scope",
",",
"orderList",
".",
"get",
"(",
"0",
")",
",",
"false",
")",
";",
"}"
] | Returns whether the prefix is sorted. | [
"Returns",
"whether",
"the",
"prefix",
"is",
"sorted",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3675-L3677 |
124,382 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateOrderList | protected void validateOrderList(SqlSelect select) {
// ORDER BY is validated in a scope where aliases in the SELECT clause
// are visible. For example, "SELECT empno AS x FROM emp ORDER BY x"
// is valid.
SqlNodeList orderList = select.getOrderList();
if (orderList == null) {
return;
}
if (!shouldAllo... | java | protected void validateOrderList(SqlSelect select) {
// ORDER BY is validated in a scope where aliases in the SELECT clause
// are visible. For example, "SELECT empno AS x FROM emp ORDER BY x"
// is valid.
SqlNodeList orderList = select.getOrderList();
if (orderList == null) {
return;
}
if (!shouldAllo... | [
"protected",
"void",
"validateOrderList",
"(",
"SqlSelect",
"select",
")",
"{",
"// ORDER BY is validated in a scope where aliases in the SELECT clause",
"// are visible. For example, \"SELECT empno AS x FROM emp ORDER BY x\"",
"// is valid.",
"SqlNodeList",
"orderList",
"=",
"select",
... | Validates the ORDER BY clause of a SELECT statement.
@param select Select statement | [
"Validates",
"the",
"ORDER",
"BY",
"clause",
"of",
"a",
"SELECT",
"statement",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3812-L3842 |
124,383 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateGroupByItem | private void validateGroupByItem(SqlSelect select, SqlNode groupByItem) {
final SqlValidatorScope groupByScope = getGroupScope(select);
groupByScope.validateExpr(groupByItem);
} | java | private void validateGroupByItem(SqlSelect select, SqlNode groupByItem) {
final SqlValidatorScope groupByScope = getGroupScope(select);
groupByScope.validateExpr(groupByItem);
} | [
"private",
"void",
"validateGroupByItem",
"(",
"SqlSelect",
"select",
",",
"SqlNode",
"groupByItem",
")",
"{",
"final",
"SqlValidatorScope",
"groupByScope",
"=",
"getGroupScope",
"(",
"select",
")",
";",
"groupByScope",
".",
"validateExpr",
"(",
"groupByItem",
")",
... | Validates an item in the GROUP BY clause of a SELECT statement.
@param select Select statement
@param groupByItem GROUP BY clause item | [
"Validates",
"an",
"item",
"in",
"the",
"GROUP",
"BY",
"clause",
"of",
"a",
"SELECT",
"statement",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3850-L3853 |
124,384 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateOrderItem | private void validateOrderItem(SqlSelect select, SqlNode orderItem) {
switch (orderItem.getKind()) {
case DESCENDING:
validateFeature(RESOURCE.sQLConformance_OrderByDesc(),
orderItem.getParserPosition());
validateOrderItem(select,
((SqlCall) orderItem).operand(0));
return;
}
final SqlVal... | java | private void validateOrderItem(SqlSelect select, SqlNode orderItem) {
switch (orderItem.getKind()) {
case DESCENDING:
validateFeature(RESOURCE.sQLConformance_OrderByDesc(),
orderItem.getParserPosition());
validateOrderItem(select,
((SqlCall) orderItem).operand(0));
return;
}
final SqlVal... | [
"private",
"void",
"validateOrderItem",
"(",
"SqlSelect",
"select",
",",
"SqlNode",
"orderItem",
")",
"{",
"switch",
"(",
"orderItem",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"DESCENDING",
":",
"validateFeature",
"(",
"RESOURCE",
".",
"sQLConformance_OrderBy... | Validates an item in the ORDER BY clause of a SELECT statement.
@param select Select statement
@param orderItem ORDER BY clause item | [
"Validates",
"an",
"item",
"in",
"the",
"ORDER",
"BY",
"clause",
"of",
"a",
"SELECT",
"statement",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3861-L3873 |
124,385 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateGroupClause | protected void validateGroupClause(SqlSelect select) {
SqlNodeList groupList = select.getGroup();
if (groupList == null) {
return;
}
final String clause = "GROUP BY";
validateNoAggs(aggOrOverFinder, groupList, clause);
final SqlValidatorScope groupScope = getGroupScope(select);
inferUnknownTypes(unknow... | java | protected void validateGroupClause(SqlSelect select) {
SqlNodeList groupList = select.getGroup();
if (groupList == null) {
return;
}
final String clause = "GROUP BY";
validateNoAggs(aggOrOverFinder, groupList, clause);
final SqlValidatorScope groupScope = getGroupScope(select);
inferUnknownTypes(unknow... | [
"protected",
"void",
"validateGroupClause",
"(",
"SqlSelect",
"select",
")",
"{",
"SqlNodeList",
"groupList",
"=",
"select",
".",
"getGroup",
"(",
")",
";",
"if",
"(",
"groupList",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"String",
"clause",
"=... | Validates the GROUP BY clause of a SELECT statement. This method is
called even if no GROUP BY clause is present. | [
"Validates",
"the",
"GROUP",
"BY",
"clause",
"of",
"a",
"SELECT",
"statement",
".",
"This",
"method",
"is",
"called",
"even",
"if",
"no",
"GROUP",
"BY",
"clause",
"is",
"present",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3891-L3948 |
124,386 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.handleScalarSubQuery | private void handleScalarSubQuery(
SqlSelect parentSelect,
SqlSelect selectItem,
List<SqlNode> expandedSelectItems,
Set<String> aliasList,
List<Map.Entry<String, RelDataType>> fieldList) {
// A scalar sub-query only has one output column.
if (1 != selectItem.getSelectList().size()) {
throw newValidatio... | java | private void handleScalarSubQuery(
SqlSelect parentSelect,
SqlSelect selectItem,
List<SqlNode> expandedSelectItems,
Set<String> aliasList,
List<Map.Entry<String, RelDataType>> fieldList) {
// A scalar sub-query only has one output column.
if (1 != selectItem.getSelectList().size()) {
throw newValidatio... | [
"private",
"void",
"handleScalarSubQuery",
"(",
"SqlSelect",
"parentSelect",
",",
"SqlSelect",
"selectItem",
",",
"List",
"<",
"SqlNode",
">",
"expandedSelectItems",
",",
"Set",
"<",
"String",
">",
"aliasList",
",",
"List",
"<",
"Map",
".",
"Entry",
"<",
"Stri... | Processes SubQuery found in Select list. Checks that is actually Scalar
sub-query and makes proper entries in each of the 3 lists used to create
the final rowType entry.
@param parentSelect base SqlSelect item
@param selectItem child SqlSelect from select list
@param expandedSelectItems Select items af... | [
"Processes",
"SubQuery",
"found",
"in",
"Select",
"list",
".",
"Checks",
"that",
"is",
"actually",
"Scalar",
"sub",
"-",
"query",
"and",
"makes",
"proper",
"entries",
"in",
"each",
"of",
"the",
"3",
"lists",
"used",
"to",
"create",
"the",
"final",
"rowType... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4129-L4164 |
124,387 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.createTargetRowType | protected RelDataType createTargetRowType(
SqlValidatorTable table,
SqlNodeList targetColumnList,
boolean append) {
RelDataType baseRowType = table.getRowType();
if (targetColumnList == null) {
return baseRowType;
}
List<RelDataTypeField> targetFields = baseRowType.getFieldList();
final List<Map.Entr... | java | protected RelDataType createTargetRowType(
SqlValidatorTable table,
SqlNodeList targetColumnList,
boolean append) {
RelDataType baseRowType = table.getRowType();
if (targetColumnList == null) {
return baseRowType;
}
List<RelDataTypeField> targetFields = baseRowType.getFieldList();
final List<Map.Entr... | [
"protected",
"RelDataType",
"createTargetRowType",
"(",
"SqlValidatorTable",
"table",
",",
"SqlNodeList",
"targetColumnList",
",",
"boolean",
"append",
")",
"{",
"RelDataType",
"baseRowType",
"=",
"table",
".",
"getRowType",
"(",
")",
";",
"if",
"(",
"targetColumnLi... | Derives a row-type for INSERT and UPDATE operations.
@param table Target table for INSERT/UPDATE
@param targetColumnList List of target columns, or null if not specified
@param append Whether to append fields to those in <code>
baseRowType</code>
@return Rowtype | [
"Derives",
"a",
"row",
"-",
"type",
"for",
"INSERT",
"and",
"UPDATE",
"operations",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4175-L4211 |
124,388 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.checkConstraint | private void checkConstraint(
SqlValidatorTable validatorTable,
SqlNode source,
RelDataType targetRowType) {
final ModifiableViewTable modifiableViewTable =
validatorTable.unwrap(ModifiableViewTable.class);
if (modifiableViewTable != null && source instanceof SqlCall) {
final Table table = modifiableVie... | java | private void checkConstraint(
SqlValidatorTable validatorTable,
SqlNode source,
RelDataType targetRowType) {
final ModifiableViewTable modifiableViewTable =
validatorTable.unwrap(ModifiableViewTable.class);
if (modifiableViewTable != null && source instanceof SqlCall) {
final Table table = modifiableVie... | [
"private",
"void",
"checkConstraint",
"(",
"SqlValidatorTable",
"validatorTable",
",",
"SqlNode",
"source",
",",
"RelDataType",
"targetRowType",
")",
"{",
"final",
"ModifiableViewTable",
"modifiableViewTable",
"=",
"validatorTable",
".",
"unwrap",
"(",
"ModifiableViewTabl... | Validates insert values against the constraint of a modifiable view.
@param validatorTable Table that may wrap a ModifiableViewTable
@param source The values being inserted
@param targetRowType The target type for the view | [
"Validates",
"insert",
"values",
"against",
"the",
"constraint",
"of",
"a",
"modifiable",
"view",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4269-L4313 |
124,389 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.checkConstraint | private void checkConstraint(
SqlValidatorTable validatorTable,
SqlUpdate update,
RelDataType targetRowType) {
final ModifiableViewTable modifiableViewTable =
validatorTable.unwrap(ModifiableViewTable.class);
if (modifiableViewTable != null) {
final Table table = modifiableViewTable.unwrap(Table.class);... | java | private void checkConstraint(
SqlValidatorTable validatorTable,
SqlUpdate update,
RelDataType targetRowType) {
final ModifiableViewTable modifiableViewTable =
validatorTable.unwrap(ModifiableViewTable.class);
if (modifiableViewTable != null) {
final Table table = modifiableViewTable.unwrap(Table.class);... | [
"private",
"void",
"checkConstraint",
"(",
"SqlValidatorTable",
"validatorTable",
",",
"SqlUpdate",
"update",
",",
"RelDataType",
"targetRowType",
")",
"{",
"final",
"ModifiableViewTable",
"modifiableViewTable",
"=",
"validatorTable",
".",
"unwrap",
"(",
"ModifiableViewTa... | Validates updates against the constraint of a modifiable view.
@param validatorTable A {@link SqlValidatorTable} that may wrap a
ModifiableViewTable
@param update The UPDATE parse tree node
@param targetRowType The target type | [
"Validates",
"updates",
"against",
"the",
"constraint",
"of",
"a",
"modifiable",
"view",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4323-L4356 |
124,390 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.getNthExpr | private SqlNode getNthExpr(SqlNode query, int ordinal, int sourceCount) {
if (query instanceof SqlInsert) {
SqlInsert insert = (SqlInsert) query;
if (insert.getTargetColumnList() != null) {
return insert.getTargetColumnList().get(ordinal);
} else {
return getNthExpr(
insert.getSource(),
ord... | java | private SqlNode getNthExpr(SqlNode query, int ordinal, int sourceCount) {
if (query instanceof SqlInsert) {
SqlInsert insert = (SqlInsert) query;
if (insert.getTargetColumnList() != null) {
return insert.getTargetColumnList().get(ordinal);
} else {
return getNthExpr(
insert.getSource(),
ord... | [
"private",
"SqlNode",
"getNthExpr",
"(",
"SqlNode",
"query",
",",
"int",
"ordinal",
",",
"int",
"sourceCount",
")",
"{",
"if",
"(",
"query",
"instanceof",
"SqlInsert",
")",
"{",
"SqlInsert",
"insert",
"=",
"(",
"SqlInsert",
")",
"query",
";",
"if",
"(",
... | Locates the n'th expression in an INSERT or UPDATE query.
@param query Query
@param ordinal Ordinal of expression
@param sourceCount Number of expressions
@return Ordinal'th expression, never null | [
"Locates",
"the",
"n",
"th",
"expression",
"in",
"an",
"INSERT",
"or",
"UPDATE",
"query",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4511-L4544 |
124,391 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateAccess | private void validateAccess(
SqlNode node,
SqlValidatorTable table,
SqlAccessEnum requiredAccess) {
if (table != null) {
SqlAccessType access = table.getAllowedAccess();
if (!access.allowsAccess(requiredAccess)) {
throw newValidationError(node,
RESOURCE.accessNotAllowed(requiredAccess.name(),
... | java | private void validateAccess(
SqlNode node,
SqlValidatorTable table,
SqlAccessEnum requiredAccess) {
if (table != null) {
SqlAccessType access = table.getAllowedAccess();
if (!access.allowsAccess(requiredAccess)) {
throw newValidationError(node,
RESOURCE.accessNotAllowed(requiredAccess.name(),
... | [
"private",
"void",
"validateAccess",
"(",
"SqlNode",
"node",
",",
"SqlValidatorTable",
"table",
",",
"SqlAccessEnum",
"requiredAccess",
")",
"{",
"if",
"(",
"table",
"!=",
"null",
")",
"{",
"SqlAccessType",
"access",
"=",
"table",
".",
"getAllowedAccess",
"(",
... | Validates access to a table.
@param table Table
@param requiredAccess Access requested on table | [
"Validates",
"access",
"to",
"a",
"table",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4635-L4647 |
124,392 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.validateValues | protected void validateValues(
SqlCall node,
RelDataType targetRowType,
final SqlValidatorScope scope) {
assert node.getKind() == SqlKind.VALUES;
final List<SqlNode> operands = node.getOperandList();
for (SqlNode operand : operands) {
if (!(operand.getKind() == SqlKind.ROW)) {
throw Util.needToImple... | java | protected void validateValues(
SqlCall node,
RelDataType targetRowType,
final SqlValidatorScope scope) {
assert node.getKind() == SqlKind.VALUES;
final List<SqlNode> operands = node.getOperandList();
for (SqlNode operand : operands) {
if (!(operand.getKind() == SqlKind.ROW)) {
throw Util.needToImple... | [
"protected",
"void",
"validateValues",
"(",
"SqlCall",
"node",
",",
"RelDataType",
"targetRowType",
",",
"final",
"SqlValidatorScope",
"scope",
")",
"{",
"assert",
"node",
".",
"getKind",
"(",
")",
"==",
"SqlKind",
".",
"VALUES",
";",
"final",
"List",
"<",
"... | Validates a VALUES clause.
@param node Values clause
@param targetRowType Row type which expression must conform to
@param scope Scope within which clause occurs | [
"Validates",
"a",
"VALUES",
"clause",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4656-L4745 |
124,393 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java | SqlValidatorImpl.alias | private static String alias(SqlNode item) {
assert item instanceof SqlCall;
assert item.getKind() == SqlKind.AS;
final SqlIdentifier identifier = ((SqlCall) item).operand(1);
return identifier.getSimple();
} | java | private static String alias(SqlNode item) {
assert item instanceof SqlCall;
assert item.getKind() == SqlKind.AS;
final SqlIdentifier identifier = ((SqlCall) item).operand(1);
return identifier.getSimple();
} | [
"private",
"static",
"String",
"alias",
"(",
"SqlNode",
"item",
")",
"{",
"assert",
"item",
"instanceof",
"SqlCall",
";",
"assert",
"item",
".",
"getKind",
"(",
")",
"==",
"SqlKind",
".",
"AS",
";",
"final",
"SqlIdentifier",
"identifier",
"=",
"(",
"(",
... | Returns the alias of a "expr AS alias" expression. | [
"Returns",
"the",
"alias",
"of",
"a",
"expr",
"AS",
"alias",
"expression",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L5142-L5147 |
124,394 | apache/flink | flink-core/src/main/java/org/apache/flink/core/fs/EntropyInjector.java | EntropyInjector.createEntropyAware | public static OutputStreamAndPath createEntropyAware(
FileSystem fs,
Path path,
WriteMode writeMode) throws IOException {
// check and possibly inject entropy into the path
final EntropyInjectingFileSystem efs = getEntropyFs(fs);
final Path processedPath = efs == null ? path : resolveEntropy(path, efs, ... | java | public static OutputStreamAndPath createEntropyAware(
FileSystem fs,
Path path,
WriteMode writeMode) throws IOException {
// check and possibly inject entropy into the path
final EntropyInjectingFileSystem efs = getEntropyFs(fs);
final Path processedPath = efs == null ? path : resolveEntropy(path, efs, ... | [
"public",
"static",
"OutputStreamAndPath",
"createEntropyAware",
"(",
"FileSystem",
"fs",
",",
"Path",
"path",
",",
"WriteMode",
"writeMode",
")",
"throws",
"IOException",
"{",
"// check and possibly inject entropy into the path",
"final",
"EntropyInjectingFileSystem",
"efs",... | Handles entropy injection across regular and entropy-aware file systems.
<p>If the given file system is entropy-aware (a implements {@link EntropyInjectingFileSystem}),
then this method replaces the entropy marker in the path with random characters.
The entropy marker is defined by {@link EntropyInjectingFileSystem#ge... | [
"Handles",
"entropy",
"injection",
"across",
"regular",
"and",
"entropy",
"-",
"aware",
"file",
"systems",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/EntropyInjector.java#L50-L63 |
124,395 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java | FsStateBackend.configure | @Override
public FsStateBackend configure(Configuration config, ClassLoader classLoader) {
return new FsStateBackend(this, config, classLoader);
} | java | @Override
public FsStateBackend configure(Configuration config, ClassLoader classLoader) {
return new FsStateBackend(this, config, classLoader);
} | [
"@",
"Override",
"public",
"FsStateBackend",
"configure",
"(",
"Configuration",
"config",
",",
"ClassLoader",
"classLoader",
")",
"{",
"return",
"new",
"FsStateBackend",
"(",
"this",
",",
"config",
",",
"classLoader",
")",
";",
"}"
] | Creates a copy of this state backend that uses the values defined in the configuration
for fields where that were not specified in this state backend.
@param config the configuration
@return The re-configured variant of the state backend | [
"Creates",
"a",
"copy",
"of",
"this",
"state",
"backend",
"that",
"uses",
"the",
"values",
"defined",
"in",
"the",
"configuration",
"for",
"fields",
"where",
"that",
"were",
"not",
"specified",
"in",
"this",
"state",
"backend",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java#L438-L441 |
124,396 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java | ExpressionResolver.getResolverRules | public static List<ResolverRule> getResolverRules() {
return Arrays.asList(
ResolverRules.LOOKUP_CALL_BY_NAME,
ResolverRules.FLATTEN_STAR_REFERENCE,
ResolverRules.EXPAND_COLUMN_FUNCTIONS,
ResolverRules.OVER_WINDOWS,
ResolverRules.FIELD_RESOLVE,
ResolverRules.FLATTEN_CALL,
ResolverRules.RESOLVE_CA... | java | public static List<ResolverRule> getResolverRules() {
return Arrays.asList(
ResolverRules.LOOKUP_CALL_BY_NAME,
ResolverRules.FLATTEN_STAR_REFERENCE,
ResolverRules.EXPAND_COLUMN_FUNCTIONS,
ResolverRules.OVER_WINDOWS,
ResolverRules.FIELD_RESOLVE,
ResolverRules.FLATTEN_CALL,
ResolverRules.RESOLVE_CA... | [
"public",
"static",
"List",
"<",
"ResolverRule",
">",
"getResolverRules",
"(",
")",
"{",
"return",
"Arrays",
".",
"asList",
"(",
"ResolverRules",
".",
"LOOKUP_CALL_BY_NAME",
",",
"ResolverRules",
".",
"FLATTEN_STAR_REFERENCE",
",",
"ResolverRules",
".",
"EXPAND_COLU... | List of rules that will be applied during expression resolution. | [
"List",
"of",
"rules",
"that",
"will",
"be",
"applied",
"during",
"expression",
"resolution",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java#L75-L85 |
124,397 | apache/flink | flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java | ExpressionResolver.resolveGroupWindow | public LogicalWindow resolveGroupWindow(GroupWindow window) {
Expression alias = window.getAlias();
if (!(alias instanceof UnresolvedReferenceExpression)) {
throw new ValidationException("Alias of group window should be an UnresolvedFieldReference");
}
final String windowName = ((UnresolvedReferenceExpress... | java | public LogicalWindow resolveGroupWindow(GroupWindow window) {
Expression alias = window.getAlias();
if (!(alias instanceof UnresolvedReferenceExpression)) {
throw new ValidationException("Alias of group window should be an UnresolvedFieldReference");
}
final String windowName = ((UnresolvedReferenceExpress... | [
"public",
"LogicalWindow",
"resolveGroupWindow",
"(",
"GroupWindow",
"window",
")",
"{",
"Expression",
"alias",
"=",
"window",
".",
"getAlias",
"(",
")",
";",
"if",
"(",
"!",
"(",
"alias",
"instanceof",
"UnresolvedReferenceExpression",
")",
")",
"{",
"throw",
... | Converts an API class to a logical window for planning with expressions already resolved.
@param window window to resolve
@return logical window with expressions resolved | [
"Converts",
"an",
"API",
"class",
"to",
"a",
"logical",
"window",
"for",
"planning",
"with",
"expressions",
"already",
"resolved",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java#L156-L196 |
124,398 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java | TaskSlotTable.start | public void start(SlotActions initialSlotActions) {
this.slotActions = Preconditions.checkNotNull(initialSlotActions);
timerService.start(this);
started = true;
} | java | public void start(SlotActions initialSlotActions) {
this.slotActions = Preconditions.checkNotNull(initialSlotActions);
timerService.start(this);
started = true;
} | [
"public",
"void",
"start",
"(",
"SlotActions",
"initialSlotActions",
")",
"{",
"this",
".",
"slotActions",
"=",
"Preconditions",
".",
"checkNotNull",
"(",
"initialSlotActions",
")",
";",
"timerService",
".",
"start",
"(",
"this",
")",
";",
"started",
"=",
"tru... | Start the task slot table with the given slot actions.
@param initialSlotActions to use for slot actions | [
"Start",
"the",
"task",
"slot",
"table",
"with",
"the",
"given",
"slot",
"actions",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L119-L125 |
124,399 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java | TaskSlotTable.allocateSlot | public boolean allocateSlot(int index, JobID jobId, AllocationID allocationId, Time slotTimeout) {
checkInit();
TaskSlot taskSlot = taskSlots.get(index);
boolean result = taskSlot.allocate(jobId, allocationId);
if (result) {
// update the allocation id to task slot map
allocationIDTaskSlotMap.put(alloc... | java | public boolean allocateSlot(int index, JobID jobId, AllocationID allocationId, Time slotTimeout) {
checkInit();
TaskSlot taskSlot = taskSlots.get(index);
boolean result = taskSlot.allocate(jobId, allocationId);
if (result) {
// update the allocation id to task slot map
allocationIDTaskSlotMap.put(alloc... | [
"public",
"boolean",
"allocateSlot",
"(",
"int",
"index",
",",
"JobID",
"jobId",
",",
"AllocationID",
"allocationId",
",",
"Time",
"slotTimeout",
")",
"{",
"checkInit",
"(",
")",
";",
"TaskSlot",
"taskSlot",
"=",
"taskSlots",
".",
"get",
"(",
"index",
")",
... | Allocate the slot with the given index for the given job and allocation id. Returns true if
the slot could be allocated. Otherwise it returns false.
@param index of the task slot to allocate
@param jobId to allocate the task slot for
@param allocationId identifying the allocation
@param slotTimeout until the slot time... | [
"Allocate",
"the",
"slot",
"with",
"the",
"given",
"index",
"for",
"the",
"given",
"job",
"and",
"allocation",
"id",
".",
"Returns",
"true",
"if",
"the",
"slot",
"could",
"be",
"allocated",
".",
"Otherwise",
"it",
"returns",
"false",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L193-L219 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.