[ https://issues.apache.org/jira/browse/FLINK-22271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-22271: ----------------------------------- Labels: stale-major (was: ) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Major but is unassigned and neither itself nor its Sub-Tasks have been updated for 30 days. I have gone ahead and added a "stale-major" to the issue". If this ticket is a Major, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized. > FlinkSQL Read Hive(parquet file) field does not exist > ------------------------------------------------------ > > Key: FLINK-22271 > URL: https://issues.apache.org/jira/browse/FLINK-22271 > Project: Flink > Issue Type: New Feature > Components: Connectors / Hive > Affects Versions: 1.12.2 > Reporter: moran > Priority: Major > Labels: stale-major > > Create a parquet table format student insert the data for each field is not > empty, FlinkSQL can query the table, if you add a field after query error. > 1.Step: > {code:sql} > CREATE TABLE tmp.student ( > name STRING, > age INT > ) > STORED AS PARQUET; > insert into table tmp.student values ("java", 12); > {code} > FlinkSQL can read the table at this point. > 2.Step: > {code:sql} > alter table tmp.student add columns(update_time timestamp); > {code} > Query error after adding field update_time. > error: > {code} > java.lang.IllegalArgumentException: update_time does not exist > at > org.apache.flink.hive.shaded.formats.parquet.ParquetVectorizedInputFormat.clipParquetSchema(ParquetVectorizedInputFormat.java:193) > at > org.apache.flink.hive.shaded.formats.parquet.ParquetVectorizedInputFormat.createReader(ParquetVectorizedInputFormat.java:120) > at > org.apache.flink.hive.shaded.formats.parquet.ParquetVectorizedInputFormat.createReader(ParquetVectorizedInputFormat.java:73) > at > org.apache.flink.connectors.hive.read.HiveBulkFormatAdapter.createReader(HiveBulkFormatAdapter.java:108) > at > org.apache.flink.connectors.hive.read.HiveBulkFormatAdapter.createReader(HiveBulkFormatAdapter.java:63) > 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:56) > at > org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:138) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)