zukowskilz opened a new issue, #6362: URL: https://github.com/apache/paimon/issues/6362
### Search before asking - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. ### Paimon version In spark when field have Void field type paimon throws misleading exception. Find the problem in my real scenario tooks me lot of time, this better message should be very helpful Here is output: `root |-- f1: string (nullable = true) |-- f2: string (nullable = true) |-- bad: void (nullable = true) +---+---+----+ |f1 |f2 |bad | +---+---+----+ |1 |2 |null| +---+---+----+ Exception in thread "main" java.lang.UnsupportedOperationException at org.apache.spark.sql.paimon.shims.Spark3Shim.isSparkVariantType(Spark3Shim.scala:107) at org.apache.paimon.spark.SparkTypeUtils$SparkToPaimonTypeVisitor.atomic(SparkTypeUtils.java:410) at org.apache.paimon.spark.SparkTypeUtils$SparkToPaimonTypeVisitor.visit(SparkTypeUtils.java:331) at org.apache.paimon.spark.SparkTypeUtils$SparkToPaimonTypeVisitor.visit(SparkTypeUtils.java:291) at org.apache.paimon.spark.SparkTypeUtils.toPaimonType(SparkTypeUtils.java:97) at org.apache.paimon.spark.SparkCatalog.toInitialSchema(SparkCatalog.java:489) at org.apache.paimon.spark.SparkCatalog.createTable(SparkCatalog.java:365) at org.apache.spark.sql.connector.catalog.TableCatalog.createTable(TableCatalog.java:199)` ### Compute Engine Spark ### Minimal reproduce step Sample code for reproduction: ` import session.implicits._ val rows = Seq( ("1","2") ).toDF("f1","f2") var brokenDF = rows.withColumn("bad",lit(null)) brokenDF.printSchema() brokenDF.show(false) brokenDF.write.format("paimon") .mode(SaveMode.Overwrite).saveAsTable("badTable") ` ### What doesn't meet your expectations? Maybe will be better to give information "Format for field [fieldName] is Void please set proper one". ### Anything else? _No response_ ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
