You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/05/06 17:57:08 UTC

[GitHub] [hudi] neerajpadarthi opened a new issue, #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

neerajpadarthi opened a new issue, #5519:
URL: https://github.com/apache/hudi/issues/5519

   Schema evolution is failing when table contains multiple base files especially when schema is promoted. If table has a single basefile then it worked as expected.   
   
   A clear and concise description of the problem.
   
   Scenario -1 (Promoting col-x int to long)
   Created table with bulk_insert parallelism - 1 (col-x schema Int)
   Performed upsert delta with col-x schema Long
   Queried  - It worked as expected and was able to query the data
   
   Scenario -2 (Promoting col x int into long)
   Created table with bulk_insert parallelism - 5 (col-x schema Int)
   Performed upsert delta with col-x schema Long  
   Queried  - Failed (Observation - only impacted base files got updated to Long)
   
   Q. Do I need to add any configurations ? or Is this a known issue?
   
   
   **Environment Description**
   
   * EMR: emr-6.5.0 
   
   * Hudi version : 0.9
   
   * Spark version : Spark 3.1.2
   
   * Hive version : Hive 3.1.2
   
   * Hadoop version :
   
   * Storage (HDFS/S3/GCS..) : S3
   
   * Running on Docker? (yes/no) : no
   
   **Stacktrace**
   
   An error was encountered:
   An error occurred while calling o203.showString.
   : org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 79.0 failed 4 times, most recent failure: Lost task 0.3 in stage 79.0 (TID 13587) (ip-10-1-108-136.ec2.internal executor 1): java.lang.UnsupportedOperationException: org.apache.parquet.column.values.dictionary.PlainValuesDictionary$PlainIntegerDictionary
   	at org.apache.parquet.column.Dictionary.decodeToLong(Dictionary.java:49)
   	at org.apache.spark.sql.execution.datasources.parquet.ParquetDictionary.decodeToLong(ParquetDictionary.java:36)
   	at org.apache.spark.sql.execution.vectorized.OnHeapColumnVector.getLong(OnHeapColumnVector.java:364)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:35)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:907)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$getByteArrayRdd$1(SparkPlan.scala:359)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2(RDD.scala:898)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2$adapted(RDD.scala:898)
   	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
   	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
   	at org.apache.spark.scheduler.Task.run(Task.scala:131)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   
   Driver stacktrace:
   	at org.apache.spark.scheduler.DAGScheduler.failJobAndIndependentStages(DAGScheduler.scala:2470)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2(DAGScheduler.scala:2419)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2$adapted(DAGScheduler.scala:2418)
   	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
   	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
   	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
   	at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:2418)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1(DAGScheduler.scala:1125)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1$adapted(DAGScheduler.scala:1125)
   	at scala.Option.foreach(Option.scala:407)
   	at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:1125)
   	at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2684)
   	at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2626)
   	at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2615)
   	at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
   	at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:914)
   	at org.apache.spark.SparkContext.runJob(SparkContext.scala:2241)
   	at org.apache.spark.SparkContext.runJob(SparkContext.scala:2262)
   	at org.apache.spark.SparkContext.runJob(SparkContext.scala:2281)
   	at org.apache.spark.sql.execution.SparkPlan.executeTake(SparkPlan.scala:494)
   	at org.apache.spark.sql.execution.SparkPlan.executeTake(SparkPlan.scala:447)
   	at org.apache.spark.sql.execution.CollectLimitExec.executeCollect(limit.scala:47)
   	at org.apache.spark.sql.Dataset.collectFromPlan(Dataset.scala:3760)
   	at org.apache.spark.sql.Dataset.$anonfun$head$1(Dataset.scala:2763)
   	at org.apache.spark.sql.Dataset.$anonfun$withAction$1(Dataset.scala:3751)
   	at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)
   	at org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)
   	at org.apache.spark.sql.execution.SQLExecution$.executeQuery$1(SQLExecution.scala:110)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:135)
   	at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)
   	at org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$5(SQLExecution.scala:135)
   	at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:253)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:134)
   	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)
   	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:68)
   	at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3749)
   	at org.apache.spark.sql.Dataset.head(Dataset.scala:2763)
   	at org.apache.spark.sql.Dataset.take(Dataset.scala:2970)
   	at org.apache.spark.sql.Dataset.getRows(Dataset.scala:303)
   	at org.apache.spark.sql.Dataset.showString(Dataset.scala:340)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
   	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
   	at py4j.Gateway.invoke(Gateway.java:282)
   	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
   	at py4j.commands.CallCommand.execute(CallCommand.java:79)
   	at py4j.GatewayConnection.run(GatewayConnection.java:238)
   	at java.lang.Thread.run(Thread.java:750)
   Caused by: java.lang.UnsupportedOperationException: org.apache.parquet.column.values.dictionary.PlainValuesDictionary$PlainIntegerDictionary
   	at org.apache.parquet.column.Dictionary.decodeToLong(Dictionary.java:49)
   	at org.apache.spark.sql.execution.datasources.parquet.ParquetDictionary.decodeToLong(ParquetDictionary.java:36)
   	at org.apache.spark.sql.execution.vectorized.OnHeapColumnVector.getLong(OnHeapColumnVector.java:364)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:35)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:907)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$getByteArrayRdd$1(SparkPlan.scala:359)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2(RDD.scala:898)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2$adapted(RDD.scala:898)
   	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
   	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
   	at org.apache.spark.scheduler.Task.run(Task.scala:131)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	... 1 more
   
   Traceback (most recent call last):
     File "/usr/lib/spark/python/lib/pyspark.zip/pyspark/sql/dataframe.py", line 485, in show
       print(self._jdf.showString(n, 20, vertical))
     File "/usr/lib/spark/python/lib/py4j-0.10.9-src.zip/py4j/java_gateway.py", line 1305, in __call__
       answer, self.gateway_client, self.target_id, self.name)
     File "/usr/lib/spark/python/lib/pyspark.zip/pyspark/sql/utils.py", line 111, in deco
       return f(*a, **kw)
     File "/usr/lib/spark/python/lib/py4j-0.10.9-src.zip/py4j/protocol.py", line 328, in get_return_value
       format(target_id, ".", name), value)
   py4j.protocol.Py4JJavaError: An error occurred while calling o203.showString.
   : org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 79.0 failed 4 times, most recent failure: Lost task 0.3 in stage 79.0 (TID 13587) (ip-10-1-108-136.ec2.internal executor 1): java.lang.UnsupportedOperationException: org.apache.parquet.column.values.dictionary.PlainValuesDictionary$PlainIntegerDictionary
   	at org.apache.parquet.column.Dictionary.decodeToLong(Dictionary.java:49)
   	at org.apache.spark.sql.execution.datasources.parquet.ParquetDictionary.decodeToLong(ParquetDictionary.java:36)
   	at org.apache.spark.sql.execution.vectorized.OnHeapColumnVector.getLong(OnHeapColumnVector.java:364)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:35)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:907)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$getByteArrayRdd$1(SparkPlan.scala:359)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2(RDD.scala:898)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2$adapted(RDD.scala:898)
   	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
   	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
   	at org.apache.spark.scheduler.Task.run(Task.scala:131)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   
   Driver stacktrace:
   	at org.apache.spark.scheduler.DAGScheduler.failJobAndIndependentStages(DAGScheduler.scala:2470)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2(DAGScheduler.scala:2419)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2$adapted(DAGScheduler.scala:2418)
   	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
   	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
   	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
   	at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:2418)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1(DAGScheduler.scala:1125)
   	at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1$adapted(DAGScheduler.scala:1125)
   	at scala.Option.foreach(Option.scala:407)
   	at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:1125)
   	at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2684)
   	at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2626)
   	at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2615)
   	at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
   	at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:914)
   	at org.apache.spark.SparkContext.runJob(SparkContext.scala:2241)
   	at org.apache.spark.SparkContext.runJob(SparkContext.scala:2262)
   	at org.apache.spark.SparkContext.runJob(SparkContext.scala:2281)
   	at org.apache.spark.sql.execution.SparkPlan.executeTake(SparkPlan.scala:494)
   	at org.apache.spark.sql.execution.SparkPlan.executeTake(SparkPlan.scala:447)
   	at org.apache.spark.sql.execution.CollectLimitExec.executeCollect(limit.scala:47)
   	at org.apache.spark.sql.Dataset.collectFromPlan(Dataset.scala:3760)
   	at org.apache.spark.sql.Dataset.$anonfun$head$1(Dataset.scala:2763)
   	at org.apache.spark.sql.Dataset.$anonfun$withAction$1(Dataset.scala:3751)
   	at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)
   	at org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)
   	at org.apache.spark.sql.execution.SQLExecution$.executeQuery$1(SQLExecution.scala:110)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:135)
   	at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)
   	at org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$5(SQLExecution.scala:135)
   	at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:253)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:134)
   	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)
   	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:68)
   	at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3749)
   	at org.apache.spark.sql.Dataset.head(Dataset.scala:2763)
   	at org.apache.spark.sql.Dataset.take(Dataset.scala:2970)
   	at org.apache.spark.sql.Dataset.getRows(Dataset.scala:303)
   	at org.apache.spark.sql.Dataset.showString(Dataset.scala:340)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
   	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
   	at py4j.Gateway.invoke(Gateway.java:282)
   	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
   	at py4j.commands.CallCommand.execute(CallCommand.java:79)
   	at py4j.GatewayConnection.run(GatewayConnection.java:238)
   	at java.lang.Thread.run(Thread.java:750)
   Caused by: java.lang.UnsupportedOperationException: org.apache.parquet.column.values.dictionary.PlainValuesDictionary$PlainIntegerDictionary
   	at org.apache.parquet.column.Dictionary.decodeToLong(Dictionary.java:49)
   	at org.apache.spark.sql.execution.datasources.parquet.ParquetDictionary.decodeToLong(ParquetDictionary.java:36)
   	at org.apache.spark.sql.execution.vectorized.OnHeapColumnVector.getLong(OnHeapColumnVector.java:364)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:35)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:907)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$getByteArrayRdd$1(SparkPlan.scala:359)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2(RDD.scala:898)
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2$adapted(RDD.scala:898)
   	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
   	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
   	at org.apache.spark.scheduler.Task.run(Task.scala:131)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	... 1 more
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] neerajpadarthi commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
neerajpadarthi commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1125632878

   @xiarixiaoyao Thanks for checking. 
   
   I have checked below scenario with alter statement using 0.9V but ended up with errors. Added my observations for your reference.  
   
   1. Created table with bulk_insert parallelism - 5 (using schema colx Int)
   > (S3 - It created 5 file groups and 1 commit file) 
   > (Glue - It created a table with colx having Int datatype)
   > (Accessed Via Spark DF - Was able to query and colx is having integer datatype)
   > (Accessed Via Spark Sql - Was able to query and colx is having integer datatype)
   
   2. Performed upsert delta with col-x schema Long 
   > (on S3 - It recreated impacted file groups(3 file groups) and added 1 commit file) 
   > (on Glue - New schema version got created and schema for colx got updated to bigint datatype)
   > (Accessed Via Spark DF - Query failed and colx is having long datatype) - Same as above error 
   > (Accessed Via Spark Sql - Was able to query old records(int) but failed when querying upserted records(long) and colx is having Integer datatype)  - Failed with org.apache.parquet.column.Dictionary.decodeToInt
   
   3. Altered the table to Long datatype using spark.sql 
   > ( on S3 - It created 1 commit file) 
   > (on Glue - New schema version got created but no change in schema attributes)
   > (Accessed Via Spark DF - Query failed and colx is having long datatype) - Same as above error 
   > (Accessed Via Spark Sql - Was able to query upserted records(long) but failed when querying old records(Int) and colx is updated to long datatype)  - Failed with org.apache.parquet.column.Dictionary.decodeToLong
   
   Summary -  Observed schema inconsistencies with spark.sql and spark DF operation. No change with Alter statement. When reading portions of the table its succeeding but it fails when complete table is read. I think as all file groups didn't update so its failing.   
   
   Q. I am currently using 0.9V. Is this an issue with this version? Do I need to migrate to 0.11V to validate schema promotion? 
   
   Please let me know if I am missing something. Thanks in Advance. 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] codope commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
codope commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1160590118

   @xiarixiaoyao Any followup on this issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] xiarixiaoyao commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
xiarixiaoyao commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1129472182

   @neerajpadarthi   Sorry for the late reply.
   yes, this is an issue with with 0.9.
   since when spark read parquet,  if we use long type to read a int type cloumn spark will throw errors.
   
   could you pls migrate it to hudi 0.11.0   and i can give you a help .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] nsivabalan commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1302886502

   @xiarixiaoyao : can we follow up on this. did we get to reproduce and make any fix on this regard? 
   @Zhangshunyu : if you don't use bulk_insert row writer path, are things ok ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] xiarixiaoyao commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
xiarixiaoyao commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1129473840

   @gy19951022 @JoshuaZhuCN  if you have webchat  you can add me '1037817390' 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] alexeykudinkin closed issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
alexeykudinkin closed issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion
URL: https://github.com/apache/hudi/issues/5519


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] gy19951022 commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
gy19951022 commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1122153879

   I have the same problem。
   
   spark:3.1.3
   hudi:0.11.0
   hadoop:3.0.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] xiarixiaoyao commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
xiarixiaoyao commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1124442163

   @neerajpadarthi   @JoshuaZhuCN  @gy19951022  pls try to use "set hoodie.schema.on.read.enable=true" to enable schem evolution.
   step1:  start spark-sql  and set hoodie.schema.on.read.enable=true
   # Spark SQL for spark 3.1.x
   spark-sql --packages org.apache.hudi:hudi-spark3.1.2-bundle_2.12:0.11.1,org.apache.spark:spark-avro_2.12:3.1.2 \
   --conf 'spark.serializer=org.apache.spark.serializer.KryoSerializer' \
   --conf 'spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension'
   
   step2:  use alter statement to alter hoodie schema.   : alter table $tableName alter column col6 type long
   
   then your can play with the hoodie table which has a new schema.
   
   your can learn more about schema evoultion on  https://hudi.apache.org/docs/schema_evolution   
   more example can be find in org.apache.spark.sql.hudi.TestSpark3DDL.scala.  thanks
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] alexeykudinkin commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
alexeykudinkin commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1307831723

   Folks, this is unfortunately an issue not of Hudi itself, but rather w/in both Parquet and Spark: as part of holistically addressing issues of handling schemas in Hudi in https://github.com/apache/hudi/pull/6358, i've stumbled upon this issue as well and here are my findings:
   
    - Type promotions could only work properly (in Spark/Parquet env) in case you're overwriting all of your data-files. In case you have a heterogeneous env where you have both base files in old schema and the new schema you'll be having issues reading such table (see below)
    - Heterogeneous table w/ type promotions won't work w/ Parquet when Dictionary Encoding is enabled (requires fixing DE impl in Parquet)
    - Heterogeneous table w/ type promotions won't work w/ Spark Vectorized Reader either ([SPARK-40876](https://issues.apache.org/jira/projects/SPARK/issues/SPARK-40876?filter=allopenissues))
   
   As such, there's no way this could be reliably supported w/in Hudi currently. Closing this for now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] JoshuaZhuCN commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
JoshuaZhuCN commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1120149152

   I have the same problem。
   
   spark:3.1.3
   hudi:0.10.1
   hadoop:3.1.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] Zhangshunyu commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
Zhangshunyu commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1166215381

   hudi0.11 also has this issue
   
   1. we create a hudi table and load data using bulkinsert with metatable enable
   2. when query disable metatable its ok
   3. but when enabled metatable and dataskip, **some query** will throw exception:
   `unsupportedOperationException PlainBianryDictionary parquet decodeToInt`
   
   we never change the schema of table
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] nsivabalan commented on issue #5519: [SUPPORT] Schema Evolution - Error with datatype promotion

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #5519:
URL: https://github.com/apache/hudi/issues/5519#issuecomment-1124388570

   @xiarixiaoyao : Do you think the new schema evolution will solve this use-case? if not for 0.11 schema on read, I guess promotion of a column will work only if all file groups are updated. If not, it could fail. its my hunch. I will try it on my end and will update here. but in the time being, can you help the user here as to how to use the schema on read feature to solve their requirement. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org