You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "jia liu (Jira)" <ji...@apache.org> on 2022/06/17 02:53:00 UTC
[jira] [Commented] (FLINK-27415) Read empty csv file throws exception in FileSystem table connector
[ https://issues.apache.org/jira/browse/FLINK-27415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555362#comment-17555362 ]
jia liu commented on FLINK-27415:
---------------------------------
[~lzljs3620320] If you're not working on it, could you assign this ticket to me?
> Read empty csv file throws exception in FileSystem table connector
> ------------------------------------------------------------------
>
> Key: FLINK-27415
> URL: https://issues.apache.org/jira/browse/FLINK-27415
> Project: Flink
> Issue Type: Bug
> Components: Connectors / FileSystem, Formats (JSON, Avro, Parquet, ORC, SequenceFile)
> Affects Versions: 1.15.0
> Reporter: Jingsong Lee
> Priority: Major
> Fix For: 1.15.2
>
>
> {code:java}
> // in CsvFilesystemBatchITCase
> @Test
> public void testEmpty() throws Exception {
> String path = new URI(resultPath()).getPath();
> new File(path).mkdirs();
> File file = new File(path, "test_file");
> file.createNewFile();
> check("select * from nonPartitionedTable", Collections.emptyList());
> } {code}
> Throws:
> {code:java}
> Caused by: java.lang.IllegalArgumentException
> at org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:122)
> at org.apache.flink.connector.file.src.impl.StreamFormatAdapter$TrackingFsDataInputStream.<init>(StreamFormatAdapter.java:264)
> at org.apache.flink.connector.file.src.impl.StreamFormatAdapter.lambda$openStream$3(StreamFormatAdapter.java:180)
> at org.apache.flink.connector.file.src.util.Utils.doWithCleanupOnException(Utils.java:45)
> at org.apache.flink.connector.file.src.impl.StreamFormatAdapter.openStream(StreamFormatAdapter.java:172)
> at org.apache.flink.connector.file.src.impl.StreamFormatAdapter.createReader(StreamFormatAdapter.java:70)
> at org.apache.flink.connector.file.src.impl.FileSourceSplitReader.checkSplitOrStartNext(FileSourceSplitReader.java:112)
> at org.apache.flink.connector.file.src.impl.FileSourceSplitReader.fetch(FileSourceSplitReader.java:65)
> at org.apache.flink.connector.base.source.reader.fetcher.FetchTask.run(FetchTask.java:58)
> at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:142)
> ... 6 more {code}
> This may be introduced by FLINK-24703
--
This message was sent by Atlassian Jira
(v8.20.7#820007)