Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

1.10版本 无法使用WATERMARK ,报空指针。

Open
#334 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, sql

Research direction

Start with the issue's CREATE TABLE statement and the CustomerWaterMarkerForLong error from the Flink 1.10 log. Compare the UNIX_TIMESTAMP-derived bigint field and WATERMARK syntax with the supported 1.10 behavior. Done means the reported schema has a complete working WATERMARK example and no longer produces the null-pointer error.

Written by the indexing model from the issue text.

Description

日志样例
{"time":"2020-06-17 23:00:01.211","pushid":"pushback_send-BC110-12392212311","app":"mm"}
由于时间序列是bigint类型,用UNIX_TIMESTAMP进行转换
Flink运行日志报错:
ERROR com.dtstack.flink.sql.watermarker.CustomerWaterMarkerForLong -
java.lang.NullPointerException

建表语句:
CREATE TABLE MyTable (
time varchar ,
pushid varchar ,
app varchar ,
UNIX_TIMESTAMP(time, 'yyyy-MM-dd HH:mm:ss')*1000 bigint AS xctime ,
WATERMARK FOR xctime AS withOffset( xctime , 1000)
)
WITH (
type='kafka11',
bootstrapServers='kafka:9092',
offsetReset='latest',
topic='test_1',
groupId='flink_sql',
parallelism='4',
timezone='Asia/Shanghai',
topicIsPattern ='false',
sourcedatatype ='dt_nest'
);

CREATE TABLE MyResult(
app VARCHAR,
cnt BIGINT,
wStart timestamp
)WITH(
type ='elasticsearch6',
address ='eshost:9200',
cluster='bigdata-es5.6',
estype ='date',
index ='MyResult',
parallelism ='1',
id='0'
);

insert into MyResult
select
d.app ,
count(d.pushid) cnt ,
TUMBLE_START(d.ROWTIME, INTERVAL '3' SECOND) as wStart
from
MyTable as d
group by d.app,TUMBLE(d.ROWTIME, INTERVAL '3' SECOND);

可否提供一份完整的1.10版本 WATERMARK 语法案例。实际测试中无法使用

Dominant language
Java
Stars
2k
Forks
913
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DTStack/flinkStreamSQL

All issues in DTStack/flinkStreamSQL

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.