Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0910fc9
[FLINK-40187][python] Introduce DataType class in DataFrame API (#28843)
auroflow Aug 3, 2026
0b66c7e
[FLINK-40286][table] Adapt keyless upsert sink should fall back to re…
snuyanzin Aug 3, 2026
77c47c8
[FLINK-40283][tests] Rename `CorrelateITCase2` to `Correlate2ITCase` …
snuyanzin Aug 3, 2026
77a017a
[FLINK-40288][table] Use correct type in `ExprCodeGenerator#visitFiel…
snuyanzin Aug 3, 2026
6e57cc5
[FLINK-40256][docs] Include sub-package config options in the configu…
spuru9 Jul 29, 2026
1b1258e
[hotfix][python] Bump soupsieve from 2.8.3 to 2.8.4 (#28812)
dependabot[bot] Aug 3, 2026
ea80169
[FLINK-40236][python] Fix _infer_type inferring array element type wi…
nikolauspschuetz Aug 3, 2026
12197ea
[FLINK-40285][table] `MLPredictSemanticTests` fails because of `ON CO…
snuyanzin Aug 3, 2026
ae9449e
[FLINK-40317][tests] Make DeletesByKeySemanticTests more stable
snuyanzin Aug 3, 2026
17c70e8
[hotfix][ci] Add ignore pattern in case of Azure
snuyanzin Aug 3, 2026
bd1becc
[FLINK-40311][tests] Rename `EndiannessAccessChecks` to `EndiannessAc…
snuyanzin Aug 3, 2026
e700705
[FLINK-40310][tests] Rename `CsvBulkWriterIT` to `CsvBulkWriterTest`
snuyanzin Aug 3, 2026
a357106
[FLINK-40307][table] `RestoreTestCompleteness` was never executed in CI
snuyanzin Aug 3, 2026
2111b41
[FLINK-40284][tests] Make tests ending with `Tests` executing in CI
snuyanzin Aug 3, 2026
6d8ce98
[FLINK-40284][tests] Archunit should fail in case of tests not matchi…
snuyanzin Aug 3, 2026
3c8740f
[hotfix][docs] Add code review guidelines to AGENTS.md
rkhachatryan Jul 31, 2026
c1133c3
[FLINK-40322][python] Fix Array/Multiset from_sql_type to decode elem…
nikolauspschuetz Aug 5, 2026
5d91e07
[FLINK-40324][table] Append-only should stay unmaterialized without a…
gustavodemorais Aug 5, 2026
e095557
[FLINK-18476][python] `PythonEnvUtils#testStartPythonProcess` might fail
snuyanzin Aug 5, 2026
33a198a
[FLINK-40305][core] Decode `VARIANT` strings and object keys as UTF-8
raminqaf Aug 5, 2026
cf2df29
[FLINK-40332][table] Prevent path traversal in FileCatalogStore catal…
gaborgsomogyi Aug 5, 2026
5eb36d4
[FLINK-40270][connector-base][runtime] Make source threads job-attrib…
Savonitar Jul 31, 2026
90dcc69
[FLINK-40089][table] Add new JSON_LENGTH built-in function
VasShabu Aug 6, 2026
7232ad9
[FLINK-39984][runtime][webUI] Support LITE/FULL thread dump modes
xingsuo-zbz Jul 15, 2026
79b4843
[FLINK-40339][table] Do not read buffer entries after removing them
gustavodemorais Aug 6, 2026
8ec1b0b
[FLINK-40326][core] Do not over-grant capacity in GatedRateLimiter
Savonitar Aug 3, 2026
bbde1d5
[FLINK-39900][forst] Add configuration option for setting the number …
francis-a Aug 6, 2026
23d7380
[FLINK-40345][checkpoint] Do not recycle the failed buffer twice in F…
1996fanrui Aug 6, 2026
4e3061e
[hotfix][ci] Bump GitHub script action to version 9
snuyanzin Aug 7, 2026
01c950f
[FLINK-39771][tests][JUnit5 migration] Module: flink-cep
spuru9 Aug 7, 2026
75d978e
[FLINK-40169][table] Add target option to the EARLY_FIRE hint (#28827)
weiqingy Aug 8, 2026
13e1709
[FLINK-39014][table] Fix the conversion to relational algebra issue i…
argoyal2212 Aug 8, 2026
4f6ef24
[FLINK-40170][table] Infer update-producing changelog mode for early-…
weiqingy Jun 7, 2026
5e425a9
[FLINK-40170][table-planner] Reword the insert-only error and compare…
weiqingy Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
branch: ${{ matrix.branch }}

- name: Trigger Workflow
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
script: |
const branch = '${{ matrix.branch }}';
Expand Down
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,15 @@ This section maps common types of Flink changes to the modules they touch and th
- You must be able to explain the design, code, and tests, debug them, and respond to review feedback substantively
- Reviewer-ready quality bar: the author owns PR quality. PRs that look AI-generated without author refinement (walls of unreviewed prose, scaffolding without behaviour, tests that do not exercise the change, padded commit messages) will be closed without review

## Code Review Guidelines

When reviewing a PR or diff against this repo:

- Look for opportunities to simplify the code, scoped to the diff itself (not pre-existing code outside the change).
- Flag comments that are obvious (restate what the code already says) or overly verbose.
- In test code, look for potential flakiness — e.g. `Thread.sleep` used outside a retry/poll loop, or similar timing-dependent, non-deterministic patterns. Where applicable, suggest clock injection (e.g. a manually-advanced `Clock`/`ManualClock`) instead of relying on wall-clock time, or waiting for the actual condition in a loop with a timeout, for deterministic tests.
- Check that each commit message conforms to Flink conventions: it must start with `[FLINK-XXXX]` or `[hotfix]`, and must specify a subsystem/component (e.g. `[FLINK-XXXX][runtime] Description`).

## Boundaries

### Ask first
Expand Down
44 changes: 44 additions & 0 deletions docs/data/sql_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,50 @@ json:
-- [{"nested_json":{"value":42}}]
JSON_ARRAY(JSON('{"nested_json": {"value": 42}}'))
```
- sql: JSON_LENGTH(json_doc[, path])
table: jsonLength(jsonObject[, path])
description: |
Returns the number of elements in a JSON document, or the length of the value at the specified path if one is provided.

The input can be a JSON STRING or a VARIANT. Returns NULL if the argument is NULL, the json is invalid, or the path is empty, malformed or does not locate a value.
The path must be a plain path literal such as '$.a.b'. A path carrying a 'lax'/'strict' path mode prefix raises an error.
eg.
-- 2
JSON_LENGTH('{"1": "hello", "2": "bye bye"}')

-- 5
JSON_LENGTH('[1,2,3,4,5]')

-- 1
JSON_LENGTH('"hello"')

-- 1
JSON_LENGTH('{"1": "hello", "2": "bye bye"}', '$.2')

-- NULL
JSON_LENGTH('{"1": "hello", "2": "BAD SYNTAX ->"', '$.2')

-- NULL
JSON_LENGTH('{"1": "hello", "2": "bye bye"}', '$.[')

-- error: JSON_LENGTH does not support the 'lax'/'strict' path mode prefix
JSON_LENGTH('{"1": "hello", "2": "bye bye"}', 'strict $.1')

The length is determined as follows:

- Scalar values (number, string, boolean): has length 1.
- Array: has a length equal to the number of its elements.
- Object: has a length equal to the number of its key-value pairs.

A wildcard path that matches 2 or more nodes returns NULL.
A NULL result is ambiguous - it means invalid JSON, no match, or a multi-match wildcard.

Pair JSON_LENGTH with a helper function to handle these cases explicitly:
-- IS JSON separates invalid input from a real result
SELECT CASE WHEN json_doc IS JSON THEN JSON_LENGTH(json_doc) END;

-- JSON_EXISTS separates an absent path from a present one
SELECT JSON_EXISTS(json_doc, '$.items[*]'), JSON_LENGTH(json_doc, '$.items[*]');

variant:
- sql: PARSE_JSON(json_string[, allow_duplicate_keys])
Expand Down
44 changes: 44 additions & 0 deletions docs/data/sql_functions_zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,50 @@ json:
-- '[[1]]'
JSON_ARRAY(JSON_ARRAY(1))
```
- sql: JSON_LENGTH(json_doc[, path])
table: jsonLength(jsonObject[, path])
description: |
Returns the number of elements in a JSON document, or the length of the value at the specified path if one is provided.

The input can be a JSON STRING or a VARIANT. Returns NULL if the argument is NULL, the json is invalid, or the path is empty, malformed or does not locate a value.
The path must be a plain path literal such as '$.a.b'. A path carrying a 'lax'/'strict' path mode prefix raises an error.
eg.
-- 2
JSON_LENGTH('{"1": "hello", "2": "bye bye"}')

-- 5
JSON_LENGTH('[1,2,3,4,5]')

-- 1
JSON_LENGTH('"hello"')

-- 1
JSON_LENGTH('{"1": "hello", "2": "bye bye"}', '$.2')

-- NULL
JSON_LENGTH('{"1": "hello", "2": "BAD SYNTAX ->"', '$.2')

-- NULL
JSON_LENGTH('{"1": "hello", "2": "bye bye"}', '$.[')

-- error: JSON_LENGTH does not support the 'lax'/'strict' path mode prefix
JSON_LENGTH('{"1": "hello", "2": "bye bye"}', 'strict $.1')

The length is determined as follows:

- Scalar values (number, string, boolean): has length 1.
- Array: has a length equal to the number of its elements.
- Object: has a length equal to the number of its key-value pairs.

A wildcard path that matches 2 or more nodes returns NULL.
A NULL result is ambiguous - it means invalid JSON, no match, or a multi-match wildcard.

Pair JSON_LENGTH with a helper function to handle these cases explicitly:
-- IS JSON separates invalid input from a real result
SELECT CASE WHEN json_doc IS JSON THEN JSON_LENGTH(json_doc) END;

-- JSON_EXISTS separates an absent path from a present one
SELECT JSON_EXISTS(json_doc, '$.items[*]'), JSON_LENGTH(json_doc, '$.items[*]');

variant:
- sql: PARSE_JSON(json_string[, allow_duplicate_keys])
Expand Down
6 changes: 6 additions & 0 deletions docs/layouts/shortcodes/generated/cluster_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
<td>Duration</td>
<td>The shutdown timeout for cluster services like executors.</td>
</tr>
<tr>
<td><h5>cluster.thread-dump.default-mode</h5></td>
<td style="word-wrap: break-word;">FULL</td>
<td><p>Enum</p></td>
<td>Default granularity of the JobManager/TaskManager thread-dump REST endpoint when no explicit <code class="highlighter-rouge">mode</code> query parameter is supplied. The default is <code class="highlighter-rouge">FULL</code> to preserve historical behavior; operators of large clusters are strongly encouraged to switch to <code class="highlighter-rouge">LITE</code> to avoid heartbeat timeouts caused by long safepoint pauses.<br /><br />Possible values:<ul><li>"LITE": Stack traces only, without lock information. Negligible JVM pause.</li><li>"FULL": Additionally collects locked monitors and j.u.c. synchronizers, equivalent to jstack -l. Pauses the JVM in a safepoint for a duration that scales with heap size and thread count, which can take seconds on large TaskManagers.</li></ul></td>
</tr>
<tr>
<td><h5>cluster.thread-dump.stacktrace-max-depth</h5></td>
<td style="word-wrap: break-word;">50</td>
Expand Down
6 changes: 6 additions & 0 deletions docs/layouts/shortcodes/generated/expert_cluster_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<td>Boolean</td>
<td>Whether processes should halt on fatal errors instead of performing a graceful shutdown. In some environments (e.g. Java 8 with the G1 garbage collector), a regular graceful shutdown can lead to a JVM deadlock. See <a href="https://issues.apache.org/jira/browse/FLINK-16510">FLINK-16510</a> for details.</td>
</tr>
<tr>
<td><h5>cluster.thread-dump.default-mode</h5></td>
<td style="word-wrap: break-word;">FULL</td>
<td><p>Enum</p></td>
<td>Default granularity of the JobManager/TaskManager thread-dump REST endpoint when no explicit <code class="highlighter-rouge">mode</code> query parameter is supplied. The default is <code class="highlighter-rouge">FULL</code> to preserve historical behavior; operators of large clusters are strongly encouraged to switch to <code class="highlighter-rouge">LITE</code> to avoid heartbeat timeouts caused by long safepoint pauses.<br /><br />Possible values:<ul><li>"LITE": Stack traces only, without lock information. Negligible JVM pause.</li><li>"FULL": Additionally collects locked monitors and j.u.c. synchronizers, equivalent to jstack -l. Pauses the JVM in a safepoint for a duration that scales with heap size and thread count, which can take seconds on large TaskManagers.</li></ul></td>
</tr>
<tr>
<td><h5>cluster.thread-dump.stacktrace-max-depth</h5></td>
<td style="word-wrap: break-word;">50</td>
Expand Down
6 changes: 6 additions & 0 deletions docs/layouts/shortcodes/generated/expert_forst_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<td>Integer</td>
<td>When the number of eviction that a block in hot link is moved to cold link reaches this value, the block will be blocked from being promoted to the head of the LRU list. The default value is '3'.</td>
</tr>
<tr>
<td><h5>state.backend.forst.checkpoint.transfer-thread-num</h5></td>
<td style="word-wrap: break-word;">4</td>
<td>Integer</td>
<td>The number of threads used to transfer files during checkpoint (writing or copying files to the checkpoint storage) and restore (transferring state files back to the ForSt working directory). Consider increasing this value when snapshotting or restoring large state. Note that the pool is created per state backend instance. Setting it too high can saturate network bandwidth or trigger rate limiting depending on the remote storage; setting it too low can lead to long checkpoint durations or timeouts for large state. The default value is '4'.</td>
</tr>
<tr>
<td><h5>state.backend.forst.executor.inline-coordinator</h5></td>
<td style="word-wrap: break-word;">false</td>
Expand Down
42 changes: 42 additions & 0 deletions docs/layouts/shortcodes/generated/expert_rocksdb_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,48 @@
<td>String</td>
<td>The local directory (on the TaskManager) where RocksDB puts its files. Per default, it will be &lt;WORKING_DIR&gt;/tmp. See <code class="highlighter-rouge">process.taskmanager.working-dir</code> for more details.</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-auto-compactions</h5></td>
<td style="word-wrap: break-word;">30</td>
<td>Integer</td>
<td>The maximum number of automatic compactions running for manual compaction to start. If the actual number is higher, manual compaction won't be started to avoid delaying automatic ones.</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-file-size-to-compact</h5></td>
<td style="word-wrap: break-word;">50 kb</td>
<td>MemorySize</td>
<td>The maximum size of individual input files</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-files-to-compact</h5></td>
<td style="word-wrap: break-word;">30</td>
<td>Integer</td>
<td>The maximum number of input files to compact together in a single compaction run</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-output-file-size</h5></td>
<td style="word-wrap: break-word;">64 mb</td>
<td>MemorySize</td>
<td>The maximum output file size</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-parallel-compactions</h5></td>
<td style="word-wrap: break-word;">5</td>
<td>Integer</td>
<td>The maximum number of manual compactions to start. Note that only one of them can run at a time as of v8.10.0; all the others will be waiting</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.min-files-to-compact</h5></td>
<td style="word-wrap: break-word;">5</td>
<td>Integer</td>
<td>The minimum number of input files to compact together in a single compaction run</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.min-interval</h5></td>
<td style="word-wrap: break-word;">0 ms</td>
<td>Duration</td>
<td>The minimum interval between manual compactions. Zero disables manual compactions</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.options-factory</h5></td>
<td style="word-wrap: break-word;">(none)</td>
Expand Down
6 changes: 6 additions & 0 deletions docs/layouts/shortcodes/generated/forst_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
<td>MemorySize</td>
<td>An upper-bound of the size that can be used for cache. User should specify at least one cache size limit to enable the cache, either this option or the 'state.backend.forst.cache.reserve-size' option. They can be set simultaneously, and in this case, cache will grow if meet the requirements of both two options. The default value is '0 bytes', meaning that this option is disabled. </td>
</tr>
<tr>
<td><h5>state.backend.forst.checkpoint.transfer-thread-num</h5></td>
<td style="word-wrap: break-word;">4</td>
<td>Integer</td>
<td>The number of threads used to transfer files during checkpoint (writing or copying files to the checkpoint storage) and restore (transferring state files back to the ForSt working directory). Consider increasing this value when snapshotting or restoring large state. Note that the pool is created per state backend instance. Setting it too high can saturate network bandwidth or trigger rate limiting depending on the remote storage; setting it too low can lead to long checkpoint durations or timeouts for large state. The default value is '4'.</td>
</tr>
<tr>
<td><h5>state.backend.forst.executor.inline-coordinator</h5></td>
<td style="word-wrap: break-word;">false</td>
Expand Down
20 changes: 20 additions & 0 deletions docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,16 @@
<tr>
<td colspan="2">Returns the thread dump of the JobManager.</td>
</tr>
<tr>
<td colspan="2">Query parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>mode</code> (optional): Controls how much lock information is collected. Supported values: [LITE, FULL]. When omitted, cluster.thread-dump.default-mode is used.</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">
<label>
Expand Down Expand Up @@ -7121,6 +7131,16 @@
</ul>
</td>
</tr>
<tr>
<td colspan="2">Query parameters</td>
</tr>
<tr>
<td colspan="2">
<ul>
<li><code>mode</code> (optional): Controls how much lock information is collected. Supported values: [LITE, FULL]. When omitted, cluster.thread-dump.default-mode is used.</li>
</ul>
</td>
</tr>
<tr>
<td colspan="2">
<label>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<table class="configuration table table-bordered">
<thead>
<tr>
<th class="text-left" style="width: 20%">Key</th>
<th class="text-left" style="width: 15%">Default</th>
<th class="text-left" style="width: 10%">Type</th>
<th class="text-left" style="width: 55%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-auto-compactions</h5></td>
<td style="word-wrap: break-word;">30</td>
<td>Integer</td>
<td>The maximum number of automatic compactions running for manual compaction to start. If the actual number is higher, manual compaction won't be started to avoid delaying automatic ones.</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-file-size-to-compact</h5></td>
<td style="word-wrap: break-word;">50 kb</td>
<td>MemorySize</td>
<td>The maximum size of individual input files</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-files-to-compact</h5></td>
<td style="word-wrap: break-word;">30</td>
<td>Integer</td>
<td>The maximum number of input files to compact together in a single compaction run</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-output-file-size</h5></td>
<td style="word-wrap: break-word;">64 mb</td>
<td>MemorySize</td>
<td>The maximum output file size</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.max-parallel-compactions</h5></td>
<td style="word-wrap: break-word;">5</td>
<td>Integer</td>
<td>The maximum number of manual compactions to start. Note that only one of them can run at a time as of v8.10.0; all the others will be waiting</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.min-files-to-compact</h5></td>
<td style="word-wrap: break-word;">5</td>
<td>Integer</td>
<td>The minimum number of input files to compact together in a single compaction run</td>
</tr>
<tr>
<td><h5>state.backend.rocksdb.manual-compaction.min-interval</h5></td>
<td style="word-wrap: break-word;">0 ms</td>
<td>Duration</td>
<td>The minimum interval between manual compactions. Zero disables manual compactions</td>
</tr>
</tbody>
</table>
22 changes: 22 additions & 0 deletions docs/static/generated/rest_v1_dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,15 @@ paths:
get:
description: Returns the thread dump of the JobManager.
operationId: getJobManagerThreadDump
parameters:
- name: mode
in: query
description: "Controls how much lock information is collected. Supported values:\
\ [LITE, FULL]. When omitted, cluster.thread-dump.default-mode is used."
required: false
style: form
schema:
$ref: "#/components/schemas/ThreadDumpMode"
responses:
"200":
description: The request was successful.
Expand Down Expand Up @@ -1863,6 +1872,14 @@ paths:
required: true
schema:
$ref: "#/components/schemas/ResourceID"
- name: mode
in: query
description: "Controls how much lock information is collected. Supported values:\
\ [LITE, FULL]. When omitted, cluster.thread-dump.default-mode is used."
required: false
style: form
schema:
$ref: "#/components/schemas/ThreadDumpMode"
responses:
"200":
description: The request was successful.
Expand Down Expand Up @@ -3911,6 +3928,11 @@ components:
type: array
items:
$ref: "#/components/schemas/ThreadInfo"
ThreadDumpMode:
type: string
enum:
- LITE
- FULL
ThreadInfo:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.flink.architecture;

import org.apache.flink.architecture.rules.ITCaseRules;
import org.apache.flink.architecture.rules.TestNamingRules;

import com.tngtech.archunit.junit.ArchTest;
import com.tngtech.archunit.junit.ArchTests;
Expand All @@ -33,4 +34,6 @@
public class TestCodeArchitectureTestBase {

@ArchTest public static final ArchTests ITCASE = ArchTests.in(ITCaseRules.class);

@ArchTest public static final ArchTests TEST_NAMING = ArchTests.in(TestNamingRules.class);
}
Loading
Loading