George Leonard
12/08/2025, 10:33 AMRUN echo "--> Install some useful tools (openjdk-17-jdk-headless required on ARM platforms to enable installation of apache-flink)" \
&& build_deps="neovim tree lnav unzip gradle python3-pip python3.10-venv openjdk-17-jdk-headless" \
&& apt-get update \
&& apt-get install -y $build_deps
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-arm64
# # https://github.com/apache/flink/tree/master/flink-python/pyflink/examples
RUN echo "--> Install apache-flink" \
&& /usr/bin/pip3 install apache-flink==1.20.1
RUN echo "--> Cleanup time" \
&& apt-get remove -y openjdk-17-jdk-headless
RUN echo "--> Purge apt artifacts" \
&& apt-get purge -y --auto-remove $build_deps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Take note of the below... otherwise your job will report a error saying there is no Python intepreter available.
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN ldconfig /usr/libEvan NotEvan
12/08/2025, 10:39 AMEvan NotEvan
12/08/2025, 10:40 AMpython -m pip install something
should always work if you have pip installedGeorge Leonard
12/08/2025, 10:52 AMdocker compose exec --interactive --tty jobmanager /bin/bash
flink@jobmanager:~$ pip install sentence_transformers
Defaulting to user installation because normal site-packages is not writeable
Collecting sentence_transformers
Downloading sentence_transformers-5.1.2-py3-none-any.whl (488 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 488.0/488.0 KB 870.2 kB/s eta 0:00:00
Collecting scikit-learn
Downloading scikit_learn-1.7.2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (9.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 12.3 MB/s eta 0:00:00
Collecting tqdm
Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 KB 14.8 MB/s eta 0:00:00
Collecting transformers<5.0.0,>=4.41.0
Downloading transformers-4.57.3-py3-none-any.whl (12.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.0/12.0 MB 24.2 MB/s eta 0:00:00
Collecting huggingface-hub>=0.20.0
Downloading huggingface_hub-1.2.1-py3-none-any.whl (520 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 520.9/520.9 KB 24.6 MB/s eta 0:00:00
Collecting Pillow
Downloading pillow-12.0.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 19.0 MB/s eta 0:00:00
Collecting torch>=1.11.0
Downloading torch-2.9.1-cp310-cp310-manylinux_2_28_aarch64.whl (104.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.2/104.2 MB 9.0 MB/s eta 0:00:00
Collecting scipy
Downloading scipy-1.15.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.5/35.5 MB 19.1 MB/s eta 0:00:00
Requirement already satisfied: typing_extensions>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from sentence_transformers) (4.15.0)
Collecting packaging>=20.9
Downloading packaging-25.0-py3-none-any.whl (66 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.5/66.5 KB 17.2 MB/s eta 0:00:00
Collecting pyyaml>=5.1
Downloading pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (740 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 740.6/740.6 KB 38.3 MB/s eta 0:00:00
Collecting shellingham
Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Collecting typer-slim
Downloading typer_slim-0.20.0-py3-none-any.whl (47 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.1/47.1 KB 11.7 MB/s eta 0:00:00
Collecting fsspec>=2023.5.0
Downloading fsspec-2025.12.0-py3-none-any.whl (201 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 201.4/201.4 KB 27.5 MB/s eta 0:00:00
Collecting hf-xet<2.0.0,>=1.2.0
Downloading hf_xet-1.2.0-cp37-abi3-manylinux_2_28_aarch64.whl (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 35.1 MB/s eta 0:00:00
Collecting httpx<1,>=0.23.0
Downloading httpx-0.28.1-py3-none-any.whl (73 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.5/73.5 KB 13.7 MB/s eta 0:00:00
Collecting filelock
Downloading filelock-3.20.0-py3-none-any.whl (16 kB)
Collecting jinja2
Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.9/134.9 KB 26.2 MB/s eta 0:00:00
Collecting sympy>=1.13.3
Downloading sympy-1.14.0-py3-none-any.whl (6.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 24.8 MB/s eta 0:00:00
Collecting networkx>=2.5.1
Downloading networkx-3.4.2-py3-none-any.whl (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 32.3 MB/s eta 0:00:00
Collecting safetensors>=0.4.3
Downloading safetensors-0.7.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (491 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 491.7/491.7 KB 21.1 MB/s eta 0:00:00
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence_transformers) (2.32.5)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence_transformers) (2025.11.3)
Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence_transformers) (1.24.4)
Collecting huggingface-hub>=0.20.0
Downloading huggingface_hub-0.36.0-py3-none-any.whl (566 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 566.1/566.1 KB 44.2 MB/s eta 0:00:00
Collecting tokenizers<=0.23.0,>=0.22.0
Downloading tokenizers-0.22.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 20.5 MB/s eta 0:00:00
Collecting threadpoolctl>=3.1.0
Downloading threadpoolctl-3.6.0-py3-none-any.whl (18 kB)
Collecting joblib>=1.2.0
Downloading joblib-1.5.2-py3-none-any.whl (308 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 308.4/308.4 KB 41.0 MB/s eta 0:00:00
Collecting anyio
Downloading anyio-4.12.0-py3-none-any.whl (113 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 113.4/113.4 KB 19.2 MB/s eta 0:00:00
Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->huggingface-hub>=0.20.0->sentence_transformers) (2025.11.12)
Collecting httpcore==1.*
Downloading httpcore-1.0.9-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.8/78.8 KB 13.8 MB/s eta 0:00:00
Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->huggingface-hub>=0.20.0->sentence_transformers) (3.11)
Collecting h11>=0.16
Downloading h11-0.16.0-py3-none-any.whl (37 kB)
Collecting mpmath<1.4,>=1.1.0
Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 KB 18.3 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
Downloading markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (22 kB)
Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers<5.0.0,>=4.41.0->sentence_transformers) (3.4.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers<5.0.0,>=4.41.0->sentence_transformers) (2.6.0)
Collecting click>=8.0.0
Downloading click-8.3.1-py3-none-any.whl (108 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.3/108.3 KB 29.3 MB/s eta 0:00:00
Collecting exceptiongroup>=1.0.2
Downloading exceptiongroup-1.3.1-py3-none-any.whl (16 kB)
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
status = run_func(*args)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 389, in run
to_install = resolver.get_installation_order(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 188, in get_installation_order
weights = get_topological_weights(
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 276, in get_topological_weights
assert len(weights) == expected_node_count
AssertionError
flink@jobmanager:~$afnan amin
12/10/2025, 9:35 AMjob.autoscaler.enabled: "false"
I am using flink2.0.Mika Naylor
12/11/2025, 9:26 AMCREATE FUNCTION syntax to support USING ARTIFACT in addition to USING JAR to lay a foundation for creating functions using non-jar sources (like, say, compiled python packages). If anyone has any input/opinions would love to see on the mailing list! https://lists.apache.org/thread/b2lsks90ktkypz8rormxc5r5tchcyrckShekhar Rajak
12/11/2025, 2:17 PMGeorge Leonard
12/11/2025, 2:24 PMTiago Pereira
12/12/2025, 3:36 PMTiago Pereira
12/12/2025, 5:26 PMTiago Pereira
12/12/2025, 5:27 PMАндрей Дробышевский
12/16/2025, 7:23 AMCaused by: java.io.IOException: Failed to deserialize consumer record due to
Caused by: java.io.IOException: Failed to deserialize consumer record ConsumerRecord(topic = topic, partition = 1, leaderEpoch = 63, offset = 98944752, CreateTime = 1765857488641, serialized key size = -1, serialized value size = 1029, headers = RecordHeaders(headers = [RecordHeader(key = traceparent, value = [48, 48, 45, 98, 97, 98, 49, 99, 56, 56, 98, 52, 102, 56, 54, 52, 54, 100, 55, 99, 52, 55, 54, 55, 50, 99, 53, 99, 101, 49, 99, 48, 55, 98, 99, 45, 97, 102, 54, 48, 50, 57, 57, 56, 51, 97, 100, 101, 54, 56, 51, 57, 45, 48, 49])], isReadOnly = false), key = null, value = [B@5c8da739).
at org.apache.flink.connector.kafka.source.reader.deserializer.KafkaDeserializationSchemaWrapper.deserialize(KafkaDeserializationSchemaWrapper.java:59)
at org.apache.flink.connector.kafka.source.reader.KafkaRecordEmitter.emitRecord(KafkaRecordEmitter.java:53)
... 14 more
Caused by: java.io.IOException: Failed to deserialize Avro record.
Caused by: java.lang.ArrayIndexOutOfBoundsException
Example of Source table definition
CREATE TABLE audit_input (
col1 STRING,
col2 STRING,
...
kafka_ts TIMESTAMP_LTZ(3) METADATA FROM 'timestamp',
`partition` BIGINT METADATA,
`offset` BIGINT METADATA,
proc_time as PROCTIME()
) WITH (
'connector' = 'kafka',
...
'value.format' = 'avro-confluent',
'value.avro-confluent.url' = 'url',
'topic' = 'topic',
)
Does anyone know how to ignore such messages?George Leonard
12/20/2025, 9:03 AMGeorge Leonard
12/22/2025, 1:12 PMGeorge Leonard
12/22/2025, 3:27 PMwith torch.no_grad():
embedding = generate_ah_embedding.model.encode(transaction_text, convert_to_numpy=True)
print(embedding)
final_size = int(target_dimensions)
#result = embedding[:final_size].astype('float64').tolist()
# Convert to list of floats for Flink
return embedding[:final_size].astype('float64').tolist()
except Exception as e:
print(f"UDF Error: {str(e)}", file=sys.stderr)
raise e
attached is the print from the embedding value.George Leonard
12/22/2025, 3:58 PMGeorge Leonard
12/22/2025, 3:59 PMJaswanth Kumar
02/28/2026, 7:51 AMGeorge Leonard
03/07/2026, 7:28 AMמייקי בר יעקב
03/09/2026, 7:15 AMShaun Wanford
03/19/2026, 10:24 PMMarek Suski
03/20/2026, 1:03 PMjianghao yang
03/24/2026, 7:03 AMHugo Polsinelli
04/12/2026, 6:33 PMflink-python/) that fixes the following issues:
- ArrayDataConverter null crash on nullable nested ARRAY fields
- Nested temporal types (TIMESTAMP, DATE, TIME, TIMESTAMP_LTZ) arriving as pemja.PyJObject instead of native Python types — added proper converters for both Table API and DataStream paths
- ClassCastException: java.sql.Timestamp cannot be cast to java.time.LocalDateTime at the Table→DataStream boundary (ExternalSerializer.serialize via OutputConversionOperator) — root cause was missing temporal entries in TypeInfoToDataConverter.typeInfoToDataConverterMap and IdentityDataConverter passing pemja's java.sql.* types through when Flink's edge serializer expects java.time.*
- Same ClassCastException pattern on the Table API side for UDF output ROWs containing temporal fields — outer DataFormatConverters.RowConverter expects java.time.* but inner IdentityDataConverter passes java.sql.* through
- Numeric DataConverter bridge-method ClassCastException (e.g. Double cannot be cast to Long) — changed generic params from specific types to Number
- Silent data corruption in ARRAY<ROW<>> from reused Row/Tuple/Object[] buffers in both PythonTypeUtils classes
- ExternalTypeInfo round-trip losing DECIMAL precision through toLegacyTypeInfo → toDataType — fixed by caching the original Java object
- typo in from_type_info_proto (type_info → type_name for LIST)
Would it be possible to open a PR against release-1.19 with this patch ?
https//github.com/apache/flink/compare/release 1.19...polsinelloflink:FLINK-35180-fix-thread-mode-type-converters?expand=1Rodney Keeling
04/23/2026, 3:42 PMajay.chaudhary
06/24/2026, 4:13 PMLior
08/12/2026, 4:58 PMMika Naylor
08/26/2026, 10:56 AMJo Wijnant
09/29/2026, 4:33 PMenv.log.level
Setting the loglevel in the open method of a ProcessFunction works but I wonder if there's a better solution?
I run Flink standalone in docker.Nick Crews
10/18/2026, 10:11 PMTable.to_pandas() returns object dtypes for every column when the result is empty
Description:
When a query returns no rows, Table.to_pandas() skips the Arrow path and returns pd.DataFrame.from_records([], columns=...). The table schema is ignored, so every column has object dtype. The same query with rows returns properly typed columns. Code that concatenates or compares results, or checks dtypes, then behaves differently depending on whether a filter happened to match anything.
python
from pyflink.table import EnvironmentSettings, TableEnvironment
t_env = TableEnvironment.create(EnvironmentSettings.in_batch_mode())
t_env.execute_sql(
"CREATE TEMPORARY VIEW t AS SELECT * FROM (VALUES "
"(1, TIMESTAMP '2024-01-01 00:00:00.123456')) AS v(a, ts)"
)
t_env.sql_query("SELECT a, ts FROM t").to_pandas().dtypes
# a int32
# ts datetime64[us]
t_env.sql_query("SELECT a, ts FROM t WHERE a > 5").to_pandas().dtypes
# a object
# ts object
Reproduced on 1.20.3 and 2.3.0, and the code is unchanged on master (flink-python/pyflink/table/table.py, the else branch of to_pandas).
Suggested fix: build the empty frame from the Arrow schema already computed for the non-empty path, so both paths share one type mapping:
python
arrow_schema = create_arrow_schema(schema.get_field_names(), schema.get_field_data_types())
pdf = arrow_schema.empty_table().to_pandas()
then run the same tz_convert_from_internal loop, so TIMESTAMP_LTZ columns match too.