name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_SynchronousChainedCombineDriver_close_rdh
// -------------------------------------------------------------------------------------------- @Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.clo...
3.26
flink_SynchronousChainedCombineDriver_getStub_rdh
// -------------------------------------------------------------------------------------------- public Function getStub() { return this.combiner; }
3.26
flink_AbstractExternalTwoInputPythonFunctionOperator_getLeftInputType_rdh
// ---------------------------------------------------------------------- // Getters // ---------------------------------------------------------------------- protected TypeInformation<IN1> getLeftInputType() { return inputTypeInfo1; }
3.26
flink_AdaptiveBatchScheduler_tryGetConsumedResultsInfo_rdh
/** * Get information of consumable results. */ private Optional<List<BlockingResultInfo>> tryGetConsumedResultsInfo(final ExecutionJobVertex jobVertex) { List<BlockingResultInfo> consumableResultInfo = new ArrayList<>();DefaultLogicalVertex logicalVertex = logicalTopology.getVertex(jobVertex.getJobVertexId()); ...
3.26
flink_AdaptiveBatchScheduler_computeVertexParallelismStoreForDynamicGraph_rdh
/** * Compute the {@link VertexParallelismStore} for all given vertices in a dynamic graph, which * will set defaults and ensure that the returned store contains valid parallelisms, with the * configured default max parallelism. * * @param vertices * the v...
3.26
flink_ExistingSavepoint_readKeyedState_rdh
/** * Read keyed state from an operator in a {@code Savepoint}. * * @param uid * The uid of the operator. * @param function * The {@link KeyedStateReaderFunction} that is called for each key in state. * @param keyTypeInfo * The type information of the key in state. * @param outTypeInfo * The type info...
3.26
flink_ExistingSavepoint_readUnionState_rdh
/** * Read operator {@code UnionState} from a {@code Savepoint}. * * @param uid * The uid of the operator. * @param name * The (unique) name for the state. * @param typeInfo * The type of the elements in the state. * @param <T> * The type of the values that are in the union state. * @return A {@code ...
3.26
flink_ExistingSavepoint_m0_rdh
/** * Read window state from an operator in a {@code Savepoint}. This method supports reading from * any type of window. * * @param assigner * The {@link WindowAssigner} used to write out the operator. * @return A {@link WindowReader}. */ public <W extends Window> WindowReader<W> m0(WindowAssigner<?, W> assign...
3.26
flink_ExistingSavepoint_window_rdh
/** * Read window state from an operator in a {@code Savepoint}. This method supports reading from * any type of window. * * @param windowSerializer * The serializer used for the window type. * @return A {@link WindowReader}. */ public <W extends Window> WindowReader<W> window(TypeSerializer<W> windowSerialize...
3.26
flink_ExistingSavepoint_readListState_rdh
/** * Read operator {@code ListState} from a {@code Savepoint} when a custom serializer was used; * e.g., a different serializer than the one returned by {@code TypeInformation#createSerializer}. * * @param uid * The uid of the operator. * @param name * The (unique) name for the state. * @param typeInfo * ...
3.26
flink_ExistingSavepoint_readBroadcastState_rdh
/** * Read operator {@code BroadcastState} from a {@code Savepoint} when a custom serializer was * used; e.g., a different serializer than the one returned by {@code TypeInformation#createSerializer}. * * @param uid * The uid of the operator. * @param name * The (unique) name for the state. * @param keyType...
3.26
flink_SolutionSetPlanNode_getSolutionSetNode_rdh
// -------------------------------------------------------------------------------------------- public SolutionSetNode getSolutionSetNode() { return ((SolutionSetNode) (this.template)); }
3.26
flink_SolutionSetPlanNode_accept_rdh
// -------------------------------------------------------------------------------------------- @Override public void accept(Visitor<PlanNode> visitor) {if (visitor.preVisit(this)) { visitor.postVisit(this); } }
3.26
flink_DefaultJobLeaderService_containsJob_rdh
// ----------------------------------------------------------- // Testing methods // ----------------------------------------------------------- /** * Check whether the service monitors the given job. * * @param jobId * identifying the job * @return True if the given job is monitored; otherwise false */ @Overri...
3.26
flink_DefaultJobLeaderService_start_rdh
// ------------------------------------------------------------------------------- // Methods // ------------------------------------------------------------------------------- @Override public void start(final String initialOwnerAddress, final RpcService initialRpcService, final HighAvailabilityServices initialHighAva...
3.26
flink_BigDecSerializer_readBigDecimal_rdh
// -------------------------------------------------------------------------------------------- // Static Helpers for BigInteger Serialization // -------------------------------------------------------------------------------------------- public static BigDecimal readBigDecimal(DataInputView source) throws IOException ...
3.26
flink_DataViewUtils_createStateId_rdh
// -------------------------------------------------------------------------------------------- private static String createStateId(int fieldIndex, String fieldName) { return (("agg" + fieldIndex) + "$") + fieldName; }
3.26
flink_DataViewUtils_createDistinctViewDataType_rdh
/** * Creates a special {@link DataType} for DISTINCT aggregates. */ public static DataType createDistinctViewDataType(DataType keyDataType, int filterArgs, int filterArgsLimit) { final DataType valueDataType; if (filterArgs <= filterArgsLimit) { valueDataType = DataTypes.BIGINT().notNull(); } e...
3.26
flink_DataViewUtils_extractDataViews_rdh
/** * Searches for data views in the data type of an accumulator and extracts them. */ public static List<DataViewSpec> extractDataViews(int aggIndex, DataType accumulatorDataType) { final LogicalType accumulatorType = accumulatorDataType.getLogicalType(); if ((!accumulatorType.is(ROW)) && (!accumulatorType.i...
3.26
flink_DataViewUtils_adjustDataViews_rdh
/** * Modifies the data type of an accumulator regarding data views. * * <p>For performance reasons, each data view is wrapped into a RAW type which gives it {@link LazyBinaryFormat} semantics and avoids multiple deserialization steps during access. * Furthermore, a data view will not be serialized if a state backe...
3.26
flink_TaskDeploymentDescriptorFactory_shouldOffload_rdh
/** * Determine whether shuffle descriptors should be offloaded to blob server. * * @param shuffleDescriptorsToSerialize * shuffle descriptors to serialize * @param numConsumers * how many consumers this serialized shuffle descriptor should be sent * @return whether shuffle descriptors should be offloaded to...
3.26
flink_LatencyTrackingStateFactory_m0_rdh
/** * Create latency tracking state if enabled. */ public static <K, N, V, S extends State> InternalKvState<K, N, ?> m0(InternalKvState<K, N, ?> kvState, StateDescriptor<S, V> stateDescriptor, LatencyTrackingStateConfig latencyTrackingStateConfig) throws Exception { if (latencyTrackingStateConfig.isEnabled())...
3.26
flink_JavaRecordBuilderFactory_setField_rdh
/** * Set record field by index. If parameter index mapping is provided, the index is mapped, * otherwise it is used as is. * * @param i * index of field to be set * @param value * field value */ void setField(int i, Object value) { if (paramIndexMapping != null) { args[paramIndexMapping[i]] = ...
3.26
flink_SortPartitionOperator_m0_rdh
/** * Returns whether using key selector or not. */ public boolean m0() { return useKeySelector; }
3.26
flink_SortPartitionOperator_translateToDataFlow_rdh
// -------------------------------------------------------------------------------------------- // Translation // -------------------------------------------------------------------------------------------- protected SingleInputOperator<?, T, ?> translateToDataFlow(Operator<T> input) { String name = "Sort at " ...
3.26
flink_SortPartitionOperator_sortPartition_rdh
/** * Appends an additional sort order with the specified field in the specified order to the local * partition sorting of the DataSet. * * @param field * The field expression referring to the field of the additional sort order of the * local partition sorting. * @param order * The order of the additional...
3.26
flink_BufferCompressor_compressToIntermediateBuffer_rdh
/** * Compresses the given {@link Buffer} using {@link BlockCompressor}. The compressed data will * be stored in the intermediate buffer of this {@link BufferCompressor} and returned to the * caller. The caller must guarantee that the returned {@link Buffer} has been freed when * calling the method next time. * *...
3.26
flink_BufferCompressor_compress_rdh
/** * Compresses the given {@link Buffer} into the intermediate buffer and returns the compressed * data size. */ private int compress(Buffer buffer) { checkArgument(buffer != null, "The input buffer must not be null."); checkArgument(buffer.isBuffer(), "Event can not be compressed."); checkArgument(!buf...
3.26
flink_BufferCompressor_compressToOriginalBuffer_rdh
/** * The difference between this method and {@link #compressToIntermediateBuffer(Buffer)} is that * this method will copy the compressed data back to the input {@link Buffer} starting from * offset 0. * * <p>The caller must guarantee that the input {@link Buffer} is writable. */ public Buffer compressToOriginalB...
3.26
flink_PhysicalFile_deleteIfNecessary_rdh
/** * Delete this physical file if there is no reference count from logical files (all discarded), * and this physical file is closed (no further writing on it). * * @throws IOException * if anything goes wrong with file system. */ public void deleteIfNecessary() throws IOException { synchronized(this) { ...
3.26
flink_PhysicalFile_isOpen_rdh
/** * * @return whether this physical file is still open for writing. */ public boolean isOpen() { return (!closed) && (outputStream != null); }
3.26
flink_PhysicalFile_innerClose_rdh
/** * Close the physical file, stop reusing. * * @throws IOException * if anything goes wrong with file system. */ private void innerClose() throws IOException { closed = true; if (outputStream != null) { outputStream.close(); outputStream = null;} }
3.26
flink_DependencyTree_getKey_rdh
/** * We don't use the {@link Dependency} as a key because we don't want lookups to be dependent on * scope or the optional flag. * * @param dependency * @return */ @VisibleForTesting static String getKey(Dependency dependency) { return (((((dependency.getGroupId() + ":") + dependency.getArtifactId()) + ":") + de...
3.26
flink_StreamSource_isCanceledOrStopped_rdh
/** * Checks whether the source has been canceled or stopped. * * @return True, if the source is canceled or stopped, false is not. */ protected boolean isCanceledOrStopped() { return canceledOrStopped; }
3.26
flink_StreamSource_markCanceledOrStopped_rdh
/** * Marks this source as canceled or stopped. * * <p>This indicates that any exit of the {@link #run(Object, Output, OperatorChain)} method * cannot be interpreted as the result of a finite source. */ protected void markCanceledOrStopped() { this.canceledOrStopped = true; }
3.26
flink_LocatableInputSplit_hashCode_rdh
// -------------------------------------------------------------------------------------------- @Override public int hashCode() { return this.f0; }
3.26
flink_LocatableInputSplit_getHostnames_rdh
/** * Returns the names of the hosts storing the data this input split refers to * * @return the names of the hosts storing the data this input split refers to */ public String[] getHostnames() { return this.hostnames; }
3.26
flink_BinaryRawValueData_toObject_rdh
// ------------------------------------------------------------------------------------------ // Public Interfaces // ------------------------------------------------------------------------------------------ @Override public T toObject(TypeSerializer<T> serializer) { if (javaObject == null)...
3.26
flink_BinaryRawValueData_materialize_rdh
// ------------------------------------------------------------------------------------ // Internal methods // ------------------------------------------------------------------------------------ @Override protected BinarySection materialize(TypeSerializer<T> serializer) { try { byte[] bytes = InstantiationUtil.ser...
3.26
flink_BinaryRawValueData_fromBytes_rdh
/** * Creates a {@link BinaryStringData} instance from the given bytes with offset and number of * bytes. */ public static <T> BinaryRawValueData<T> fromBytes(byte[] bytes, int offset, int numBytes) { return new BinaryRawValueData<>(new MemorySegment[]{ MemorySegmentFactory.wrap(bytes) }, offset, numBytes); }
3.26
flink_BinaryRawValueData_fromObject_rdh
// ------------------------------------------------------------------------------------------ // Construction Utilities // ------------------------------------------------------------------------------------------ /** * Creates a {@link BinaryRawValueData} instance from the given Java object. */ public static <T> Bin...
3.26
flink_OneInputStateTransformation_transform_rdh
/** * Method for passing user defined operators along with the type information that will transform * the OperatorTransformation. * * <p><b>IMPORTANT:</b> Any output from this operator will be discarded. * * @param factory * A factory returning transformation logic type of the return stream * @return An {@li...
3.26
flink_OneInputStateTransformation_keyBy_rdh
/** * Partitions the operator state of a {@link OperatorTransformation} using field expressions. A * field expression is either the name of a public field or a getter method with parentheses of * the {@code OperatorTransformation}'s underlying type. A dot can be used to drill down into * objects, as in {@code "fiel...
3.26
flink_OneInputStateTransformation_m0_rdh
/** * It creates a new {@link KeyedOperatorTransformation} that uses the provided key for * partitioning its operator states. * * @param keySelector * The KeySelector to be used for extracting the key for partitioning. * @return The {@code BootstrapTransformation} with partitioned state. */ public <K> KeyedSta...
3.26
flink_OneInputStateTransformation_setMaxParallelism_rdh
/** * Sets the maximum parallelism of this operator. * * <p>The maximum parallelism specifies the upper bound for dynamic scaling. It also defines the * number of key groups used for partitioned state. * * @param maxParallelism * Maximum parallelism * @return The operator with set maximum parallelism */ @Pub...
3.26
flink_PythonTableUtils_createTableFromElement_rdh
/** * Create a table from {@link PythonDynamicTableSource} that read data from input file with * specific {@link DataType}. * * @param tEnv * The TableEnvironment to create table. * @param filePath * the file path of the input data. * @param schema * The python data type. * @param batched * Whether t...
3.26
flink_CastRule_canFail_rdh
/** * Returns true if the {@link CastExecutor} can fail at runtime. */default boolean canFail(LogicalType inputLogicalType, LogicalType targetLogicalType) { return false; }
3.26
flink_CastRule_create_rdh
/** * Create a casting context. */ static Context create(boolean isPrinting, boolean legacyBehaviour, ZoneId zoneId, ClassLoader classLoader) { return new Context() { @Override public boolean isPrinting() { return isPrinting; } @Override public boolean legacyB...
3.26
flink_ProcessPythonEnvironmentManager_getBootLog_rdh
/** * Returns the boot log of the Python Environment. */ public String getBootLog() throws Exception { File bootLogFile = new File((resource.baseDirectory + File.separator) + "flink-python-udf-boot.log"); String v5 = "Failed to create stage bundle factory!"; if (bootLogFile.exists()) { byte[] outp...
3.26
flink_ProcessPythonEnvironmentManager_createRetrievalToken_rdh
/** * Returns an empty RetrievalToken because no files will be transmit via ArtifactService in * process mode. * * @return The path of empty RetrievalToken. */ public String createRetrievalToken() throws IOException { File retrievalToken = new File(resource.baseDirectory, ("retr...
3.26
flink_CoFeedbackTransformation_addFeedbackEdge_rdh
/** * Adds a feedback edge. The parallelism of the {@code Transformation} must match the * parallelism of the input {@code Transformation} of the upstream {@code Transformation}. * * @param transform * The new feedback {@code Transformation}. */ public void addFeedbackEdge(Transformation<F> transform) { if ...
3.26
flink_CoFeedbackTransformation_getWaitTime_rdh
/** * Returns the wait time. This is the amount of time that the feedback operator keeps listening * for feedback elements. Once the time expires the operation will close and will not receive * further elements. */ public Long getWaitTime() { return waitTime; }
3.26
flink_CoFeedbackTransformation_getFeedbackEdges_rdh
/** * Returns the list of feedback {@code Transformations}. */public List<Transformation<F>> getFeedbackEdges() { return f0; }
3.26
flink_HiveInspectors_toInspectors_rdh
/** * Get an array of ObjectInspector from the give array of args and their types. */ public static ObjectInspector[] toInspectors(HiveShim hiveShim, Object[] args, DataType[] argTypes) { assert args.length == argTypes.length; ObjectInspector[] argumentInspectors = new ObjectInspector[argTypes.length]; ...
3.26
flink_HiveInspectors_getConversion_rdh
/** * Get conversion for converting Flink object to Hive object from an ObjectInspector and the * corresponding Flink DataType. */ public static HiveObjectConversion getConversion(ObjectInspector inspector, LogicalType dataType, HiveShim hiveShim) { if (inspector instanceof PrimitiveObjectInspector) { Hi...
3.26
flink_HiveInspectors_getArgInspectors_rdh
/** * Get object inspector for each function argument. */ public static ObjectInspector[] getArgInspectors(HiveShim hiveShim, HiveFunctionArguments arguments) { ObjectInspector[] inspectors = new ObjectInspector[arguments.size()]; for (int i = 0; i < inspectors.length; i++) { if (arguments.isLiteral...
3.26
flink_HiveInspectors_getObjectInspector_rdh
/** * Get Hive {@link ObjectInspector} for a Flink {@link LogicalType}. */ public static ObjectInspector getObjectInspector(LogicalType flinkType) { return getObjectInspector(HiveTypeUtil.toHiveTypeInfo(flinkType, true)); }
3.26
flink_RetryRule_evaluate_rdh
/** * Retry a test in case of a failure with a specific exception. * * @throws Throwable */ @Override public void evaluate() throws Throwable { for (int currentRun = 0; currentRun <= timesOnFailure; currentRun++) {try { statement.evaluate(); break;// success } catch (Throwable t...
3.26
flink_MapNode_computeOperatorSpecificDefaultEstimates_rdh
/** * Computes the estimates for the Map operator. We assume that by default, Map takes one value * and transforms it into another value. The cardinality consequently stays the same. */ @Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { this.estimatedNumRecords = getPre...
3.26
flink_SlidingEventTimeWindows_of_rdh
/** * Creates a new {@code SlidingEventTimeWindows} {@link WindowAssigner} that assigns elements to * time windows based on the element timestamp and offset. * * <p>For example, if you want window a stream by hour,but window begins at the 15th minutes of * each hour, you can use {@code of(Time.hours(1),Time.minute...
3.26
flink_ListStateDescriptor_getElementSerializer_rdh
/** * Gets the serializer for the elements contained in the list. * * @return The serializer for the elements in the list. */ public TypeSerializer<T> getElementSerializer() { // call getSerializer() here to get the initialization check and proper error message final TypeSerializer<List<T>> rawSerializer = ...
3.26
flink_AbstractExternalDataStreamPythonFunctionOperator_getOutputTagById_rdh
// ---------------------------------------------------------------------- // Side outputs // ---------------------------------------------------------------------- protected OutputTag<?> getOutputTagById(String id) { Preconditions.checkArgument(sideOutputTags.containsKey(id)); return sideOutputTags.get(id); }
3.26
flink_ManuallyTriggeredScheduledExecutorService_trigger_rdh
/** * Triggers the next queued runnable and executes it synchronously. This method throws an * exception if no Runnable is currently queued. */ public void trigger() { final Runnable next; synchronized(queuedRunnables) { next = queuedRunnables.removeFirst();} next.run(); }
3.26
flink_ManuallyTriggeredScheduledExecutorService_numQueuedRunnables_rdh
/** * Gets the number of Runnables currently queued. */ public int numQueuedRunnables() { synchronized(queuedRunnables) { return queuedRunnables.size(); } }
3.26
flink_ManuallyTriggeredScheduledExecutorService_triggerNonPeriodicScheduledTasksWithRecursion_rdh
/** * Triggers all non-periodically scheduled tasks. In contrast to {@link #triggerNonPeriodicScheduledTasks()}, if such a task schedules another non-periodically * schedule task, then this new task will also be triggered. */ public void triggerNonPeriodicScheduledTasksWithRecursion() { while (!nonPeriodicSchedu...
3.26
flink_ManuallyTriggeredScheduledExecutorService_triggerNonPeriodicScheduledTask_rdh
/** * Triggers a single non-periodically scheduled task. * * @throws NoSuchElementException * If there is no such task. */ public void triggerNonPeriodicScheduledTask() { final ScheduledTask<?> poll = nonPeriodicScheduledTasks.remove(); ...
3.26
flink_ManuallyTriggeredScheduledExecutorService_shutdown_rdh
// ------------------------------------------------------------------------ // service shutdown // ------------------------------------------------------------------------ @Override public void shutdown() { shutdown = true; }
3.26
flink_ManuallyTriggeredScheduledExecutorService_execute_rdh
// ------------------------------------------------------------------------ // (scheduled) execution // ------------------------------------------------------------------------ @Override public void execute(@Nonnull Runnable command) { synchronized(queuedRunnables) { queuedRunnables.addLast(command); }...
3.26
flink_ManuallyTriggeredScheduledExecutorService_triggerAllNonPeriodicTasks_rdh
// ------------------------------------------------------------------------ // Execution triggering and access to the queued tasks // ------------------------------------------------------------------------ /** * Executes all runnable and scheduled non-periodic tasks until none are left to run. This is * essentially ...
3.26
flink_ManuallyTriggeredScheduledExecutorService_triggerScheduledTasks_rdh
/** * Triggers all registered tasks. */ public void triggerScheduledTasks() { triggerPeriodicScheduledTasks();triggerNonPeriodicScheduledTasks(); }
3.26
flink_ManuallyTriggeredScheduledExecutorService_submit_rdh
// ------------------------------------------------------------------------ // non-implemented future task methods // ------------------------------------------------------------------------ @Override public <T> Future<T> submit(Callable<T> task) { throw new UnsupportedOperationException(); }
3.26
flink_ManuallyTriggeredScheduledExecutorService_triggerAll_rdh
/** * Triggers all {@code queuedRunnables}. */ public void triggerAll() { while (numQueuedRunnables() > 0) {trigger(); } }
3.26
flink_ClusterEntrypoint_runClusterEntrypoint_rdh
// Helper methods // -------------------------------------------------- public static void runClusterEntrypoint(ClusterEntrypoint clusterEntrypoint) { final String clusterEntrypointName = clusterEntrypoint.getClass().getSimpleName(); try { clusterEntrypoint.startCluster(); } catch (ClusterEntrypoin...
3.26
flink_ClusterEntrypoint_closeClusterComponent_rdh
/** * Close cluster components and deregister the Flink application from the resource management * system by signalling the {@link ResourceManager}. * * @param applicationStatus * to terminate the application with * @param shutdownBehaviour * shutdown behaviour * @param diagnostics * additional informati...
3.26
flink_ClusterEntrypoint_m0_rdh
/** * Returns the port range for the common {@link RpcService}. * * @param configuration * to extract the port range from * @return Port range for the common {@link RpcService} */ protected String m0(Configuration configuration) { if (ZooKeeperUtils.isZooKeeperRecoveryMode(configuration)) { return ...
3.26
flink_ClusterEntrypoint_generateClusterConfiguration_rdh
// -------------------------------------------------- // Internal methods // -------------------------------------------------- private Configuration generateClusterConfiguration(Configuration configuration) { final Configuration resultConfiguration = new Configuration(Preconditions.checkNotNull(configuration)); ...
3.26
flink_NettyShuffleEnvironment_close_rdh
/** * Tries to shut down all network I/O components. */ @Override public void close() { synchronized(lock) { if (isClosed) { return; } LOG.info("Shutting down the network environment and its components."); // terminate all network connections try { L...
3.26
flink_NettyShuffleEnvironment_getResultPartitionManager_rdh
// Properties // -------------------------------------------------------------------------------------------- @VisibleForTesting public ResultPartitionManager getResultPartitionManager() { return resultPartitionManager; }
3.26
flink_NettyShuffleEnvironment_registerLegacyNetworkMetrics_rdh
/** * Registers legacy network metric groups before shuffle service refactoring. * * <p>Registers legacy metric groups if shuffle service implementation is original default one. * * @deprecated should be removed in future */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated public void registerLegacyNetworkM...
3.26
flink_DynamicPartitionPruningUtils_isNewSource_rdh
/** * Returns true if the source is FLIP-27 source, else false. */ private static boolean isNewSource(ScanTableSource scanTableSource) { ScanTableSource.ScanRuntimeProvider provider = scanTableSource.getScanRuntimeProvider(ScanRuntimeProviderContext.INSTANCE); if (provider instanceof SourceProvider) { return true; }...
3.26
flink_DynamicPartitionPruningUtils_isSuitableJoin_rdh
/** * Judge whether the join node is suitable one for dpp pattern. */ public static boolean isSuitableJoin(Join join) { // Now dynamic partition pruning supports left/right join, inner and semi // join. but now semi join can not join reorder. if ((((join.getJoinType() != JoinRelType.INNER) && ...
3.26
flink_DynamicPartitionPruningUtils_canConvertAndConvertDppFactSide_rdh
/** * Judge whether the input RelNode can be converted to the dpp fact side. If the input RelNode * can be converted, this method will return the converted fact side whose partitioned table * source will be converted to {@link BatchPhysicalDynamicFilteringTableSourceScan}, If not, * this method will return the orig...
3.26
flink_DynamicPartitionPruningUtils_visitDimSide_rdh
/** * Visit dim side to judge whether dim side has filter condition and whether dim side's * source table scan is non partitioned scan. */ private void visitDimSide(RelNode rel) { // TODO Let visitDimSide more efficient and more accurate. Like a filter on dim table or ...
3.26
flink_DynamicPartitionPruningUtils_isSuitableFilter_rdh
/** * Not all filter condition suitable for using to filter partitions by dynamic partition * pruning rules. For example, NOT NULL can only filter one default partition which have a * small impact on filtering data. */ private static boolean isSuitableFilter(RexNode filterCondition) { switch (filterCondition.getKin...
3.26
flink_CompilerHints_addUniqueFields_rdh
/** * Adds multiple FieldSets to be unique * * @param uniqueFieldSets * A set of unique FieldSet */ public void addUniqueFields(Set<FieldSet> uniqueFieldSets) { if (this.uniqueFields == null) { this.uniqueFields = new HashSet<FieldSet>(); } this.uniqueFields.addAll(uniqueFieldSets); }
3.26
flink_CompilerHints_getUniqueFields_rdh
// -------------------------------------------------------------------------------------------- // Uniqueness // -------------------------------------------------------------------------------------------- /** * Gets the FieldSets that are unique * * @return List of FieldSet that are unique */ public Set<FieldSet> ...
3.26
flink_CompilerHints_copyFrom_rdh
// -------------------------------------------------------------------------------------------- // Miscellaneous // -------------------------------------------------------------------------------------------- protected void copyFrom(CompilerHints source) { this.outputSize = source.outputSize; this.outputCardinality = ...
3.26
flink_CompilerHints_getOutputSize_rdh
// -------------------------------------------------------------------------------------------- // Basic Record Statistics // -------------------------------------------------------------------------------------------- public long getOutputSize() { return outputSize; }
3.26
flink_CompilerHints_addUniqueField_rdh
/** * Adds a field as having only unique values. * * @param field * The field with unique values. */ public void addUniqueField(int field) { if (this.uniqueFields == null) { this.uniqueFields = new HashSet<FieldSet>(); } this.uniqueFields.add(new FieldSet(field)); }
3.26
flink_InputPriorityGraphGenerator_calculatePipelinedAncestors_rdh
/** * Find the ancestors by going through PIPELINED edges. */ @VisibleForTesting List<ExecNode<?>> calculatePipelinedAncestors(ExecNode<?> node) { List<ExecNode<?>> ret = new ArrayList<>(); AbstractExecNodeExactlyOnceVisitor ancestorVisitor = new AbstractExecNodeExactlyOnceVisitor() { @Override protected voi...
3.26
flink_TaskExecutionState_getID_rdh
/** * Returns the ID of the task this result belongs to * * @return the ID of the task this result belongs to */public ExecutionAttemptID getID() { return this.executionId; }
3.26
flink_TaskExecutionState_getAccumulators_rdh
/** * Gets flink and user-defined accumulators in serialized form. */ public AccumulatorSnapshot getAccumulators() { return accumulators; }
3.26
flink_TaskExecutionState_getExecutionState_rdh
/** * Returns the new execution state of the task. * * @return the new execution state of the task */ public ExecutionState getExecutionState() { return this.executionState; }
3.26
flink_TaskExecutionState_equals_rdh
// -------------------------------------------------------------------------------------------- @Override public boolean equals(Object obj) { if (obj instanceof TaskExecutionState) { TaskExecutionState v0 = ((TaskExecutionState) (obj)); return (v0.executionId.equals(this.executionId) && (v0.executionState == t...
3.26
flink_TaskExecutionState_getError_rdh
// -------------------------------------------------------------------------------------------- /** * 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-d...
3.26
flink_FlinkStatement_clearWarnings_rdh
// TODO We currently do not support this, but we can't throw a SQLException here because we want // to support jdbc tools such as beeline and sqlline. @Override public void clearWarnings() throws SQLException { }
3.26
flink_FlinkStatement_execute_rdh
/** * Execute a sql statement. Notice that the <code>INSERT</code> statement in Flink would return * job id as result set. * * @param sql * any SQL statement * @return True if there is result set for the statement. * @throws SQLException * the thrown exception. */ @Override public boolean execute(String sq...
3.26
flink_FlinkStatement_executeQuery_rdh
/** * Execute a SELECT query. * * @param sql * an SQL statement to be sent to the database, typically a static SQL <code>SELECT * </code> statement * @return the select query result set. * @throws SQLException * the thrown exception */ @Override public ResultSet executeQuery(String sql) throws SQLExcepti...
3.26
flink_IntCounter_toString_rdh
// ------------------------------------------------------------------------ // Utilities // ------------------------------------------------------------------------ @Override public String toString() { return "IntCounter " + this.localValue; }
3.26
flink_IntCounter_add_rdh
// ------------------------------------------------------------------------ // Primitive Specializations // ------------------------------------------------------------------------ public void add(int value) { localValue += value; }
3.26