xiarixiaoyao commented on code in PR #8450:
URL: https://github.com/apache/hudi/pull/8450#discussion_r1165419086


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala:
##########
@@ -86,6 +87,14 @@ class TestCreateTable extends HoodieSparkSqlTestBase {
     assertResult(tableName)(tableConfig.getTableName)
     assertFalse(tableConfig.contains(OPERATION.key()))
 
+    val schemaOpt = tableConfig.getTableCreateSchema
+    assertTrue(schemaOpt.isPresent, "Table create schema should be persisted")
+    val noMetadataFields = schemaOpt.get().getFields.stream()
+      .noneMatch(new Predicate[Field] {
+        override def test(f: Field): Boolean = 
HoodieRecord.HOODIE_META_COLUMNS.contains(f.name())
+      })
+    assertTrue(noMetadataFields, "Table create schema should not include 
metadata fields")
+

Review Comment:
       assertFalse(schemaOpt.get().getFields.asScala.find(f => 
HoodieRecord.HOODIE_META_COLUMNS.contains(f.name())).isDefined,
         "Table create schema should not include metadata fields")



-- 
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]

Reply via email to