Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Table-model support for the Flink connectors: concrete design and three open questions

未关闭
#18,565 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
java
领域
databases

调研方向

先构建并运行现有的两个 Flink connector,然后阅读 IoTDBSinkFunction 中所引用的路径解析和 Session 调用附近的代码。比较对应的 Spark connector 目录树,并检查 source、CDC 和 lookup 路径,然后再决定单独的 table connector 和 sink-first 实现是否合适。三项设计问题都有答案并且实现形态达成一致,就算完成。

由索引模型根据 Issue 内容生成。

描述

Concrete design: table-model support for the Flink connectors

Follow-up to [DISCUSS] Table-model support for the Flink connectors on
dev@iotdb.apache.org (2026-08-08). That thread received no replies, so what
follows is the design I proposed there written out concretely. The three
questions I asked on the list are still open, and I have kept them open here
rather than treating silence as agreement on any of them.

The problem

flink-sql-iotdb-connector's schema mapping is the tree model, not a
configuration of it. In IoTDBSinkFunction a Flink column name is parsed as an
IoTDB path and split into a device and a measurement:

:132-136  PathUtils.splitPathToDetachedNodes(fieldName);
          measurement = nodes[nodes.length - 1];
          device      = join(copyOfRange(nodes, 0, nodes.length - 1), '.');
:108-113  session.insertAlignedRecord(...) / session.insertRecord(...)
:86       new Session.Builder().nodeUrls(..).username(..).password(..).build()

In table mode there is no path to split. A column is a TAG, FIELD or ATTRIBUTE
under database.table, and which of the three it is carries meaning a name
cannot express. The connector's option list agrees that this is not a
configuration gap: there is no database and no dialect option, and aligned
and cdc.pattern are tree concepts.

Proposed shape

A new module flink-iotdb-table-connector, leaving flink-sql-iotdb-connector
untouched, mirroring how this repository already split Spark:
spark-iotdb-connector and spark-iotdb-table-connector are parallel trees with
their own parent poms, and the table one has its own spark-iotdb-table-common
rather than sharing the tree one's.

The objection to a separate module is duplicated CDC, lookup and bounded-scan
machinery. That objection applied equally to the Spark split and the project
accepted it there, so the cost is one this repository has already weighed for
this exact problem.

Three questions that are still open

The DISCUSS thread drew no replies. Lazy consensus covers "nobody objected to
the direction"; it does not answer these, and one of them rests on reading I
explicitly flagged as incomplete.

  1. Is a separate flink-iotdb-table-connector the right shape here? The
    Spark precedent is the argument for it, but Spark's split may have had
    reasons that do not carry over.

  2. Is the sink the right place to start? My reading was that the source's
    tree couplings are the dialect-less Session and the TIME clause — a
    smaller and different problem from a mapping with no table-mode analogue —
    which would put the design work in the sink. I have not read the CDC or
    lookup paths.
    If the source has couplings I have not found, this ordering
    is wrong and I would rather know before writing code than after.

  3. Is anyone already working on this? I searched issues and pull requests in
    both iotdb-extras and iotdb and found nothing on Flink and the table
    model, but a search is not the same as asking.

What I plan to do next

Subject to the above: build and run both existing Flink connectors first. My
DISCUSS post was explicit that everything in it came from reading source and
that I had run neither connector. That is a reasonable basis for proposing a
shape; it is not a reasonable basis for implementing one, so running them is the
first step rather than a later one.

I am happy to take the implementation if the direction holds, and equally happy
to hand the design to whoever is better placed to do it.

主要语言
Java
星标
6.4k
派生
1.2k
平均合并
1 天 17 小时
30 天内合并 PR
152

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/iotdb 的其他 Issue

查看 apache/iotdb 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。