You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "tanjialiang (Jira)" <ji...@apache.org> on 2023/06/05 07:28:00 UTC
[jira] [Created] (FLINK-32252) SELECT COUNT(*) will return nothing when source no data return
tanjialiang created FLINK-32252:
-----------------------------------
Summary: SELECT COUNT(*) will return nothing when source no data return
Key: FLINK-32252
URL: https://issues.apache.org/jira/browse/FLINK-32252
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 1.16.1
Reporter: tanjialiang
mysql source
{code:java}
CREATE TABLE student(
id int primary key auto_increment,
name varchar(32),
age int
);
INSERT INTO student(name, age) VALUES ('tanjl',18),('jark',20),('mike',16),('rose',21);{code}
Flink SQL
{code:java}
CREATE TABLE student (
`id` INT PRIMARY KEY,
`name` STRING,
`age` INT
) WITH (
'connector' = 'jdbc',
'url' = 'jdbc:mysql://localhost/test?serverTimezone=UTC',
'username' = 'root',
'password' = 'root',
'table-name' = 'student'
);
SELECT count(*) FROM student WHERE age < 15;{code}
flink will return nothing because jdbc connector push the filter down(after flink-connector-jdbc-3.1.0), which make source no data return.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)