You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "YUJIANBO (Jira)" <ji...@apache.org> on 2021/01/13 06:54:00 UTC

[jira] [Created] (FLINK-20951) Flink SQL cli queries the partition table with hive as two fields. If the where condition does not specify all the two fields, an exception will occur

YUJIANBO created FLINK-20951:
--------------------------------

             Summary: Flink SQL cli queries the partition table with hive as two fields. If the where condition does not specify all the two fields, an exception will occur
                 Key: FLINK-20951
                 URL: https://issues.apache.org/jira/browse/FLINK-20951
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Hive, Table SQL / Runtime
    Affects Versions: 1.12.0
         Environment: flink 1.12.0    release-12
sql-cli
            Reporter: YUJIANBO


The production hive table is partitioned by two fields:datekey and event

I have do this test:
(1)First:
SELECT vid From table_A WHERE datekey = '20210112' AND event = 'XXX' AND vid
= 'aaaaaa';    (OK)
SELECT vid From table_A WHERE datekey = '20210112' AND vid = 'aaaaaa';    
(Error)

(2)第二组对比
SELECT vid From table_B WHERE datekey = '20210112' AND event = 'YYY' AND vid
= 'bbbbbb';    (OK)
SELECT vid From table_B WHERE datekey = '20210112' AND vid = 'bbbbbb';    
(Error)

The exception is:
java.lang.RuntimeException: One or more fetchers have encountered exception
        at
org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager.checkErrors(SplitFetcherManager.java:199)
        at
org.apache.flink.connector.base.source.reader.SourceReaderBase.getNextFetch(SourceReaderBase.java:154)
        at
org.apache.flink.connector.base.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:116)
        at
org.apache.flink.streaming.api.operators.SourceOperator.emitNext(SourceOperator.java:273)
        at
org.apache.flink.streaming.runtime.io.StreamTaskSourceInput.emitNext(StreamTaskSourceInput.java:67)
        at
org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:395)
        at
org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:191)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:609)
        at
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:573)
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:755)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:570)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: SplitFetcher thread 19 received
unexpected exception while polling the records
        at
org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:146)
        at
org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:101)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        ... 1 more
Caused by: java.lang.IllegalArgumentException
        at java.nio.Buffer.position(Buffer.java:244)
        at
org.apache.flink.hive.shaded.parquet.io.api.Binary$ByteBufferBackedBinary.getBytes(Binary.java:424)
        at
org.apache.flink.hive.shaded.formats.parquet.vector.reader.BytesColumnReader.readBatchFromDictionaryIds(BytesColumnReader.java:79)
        at
org.apache.flink.hive.shaded.formats.parquet.vector.reader.BytesColumnReader.readBatchFromDictionaryIds(BytesColumnReader.java:33)
        at
org.apache.flink.hive.shaded.formats.parquet.vector.reader.AbstractColumnReader.readToVector(AbstractColumnReader.java:199)
        at
org.apache.flink.hive.shaded.formats.parquet.ParquetVectorizedInputFormat$ParquetReader.nextBatch(ParquetVectorizedInputFormat.java:359)
        at
org.apache.flink.hive.shaded.formats.parquet.ParquetVectorizedInputFormat$ParquetReader.readBatch(ParquetVectorizedInputFormat.java:328)
        at
org.apache.flink.connector.file.src.impl.FileSourceSplitReader.fetch(FileSourceSplitReader.java:67)
        at
org.apache.flink.connector.base.source.reader.fetcher.FetchTask.run(FetchTask.java:56)
        at
org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:138)
        ... 6 more



Flink  Email:    http://apache-flink.147419.n8.nabble.com/Flink-sql-cli-hive-where-td10139.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)