[HUDI-3172] Refactor hudi existing modules to make more code reuse in V2 Implementation (#4514)
* Introduce hudi-spark3-common and hudi-spark2-common modules to place classes that would be reused in different spark versions, also introduce hudi-spark3.1.x to support spark 3.1.x. * Introduce hudi format under hudi-spark2, hudi-spark3, hudi-spark3.1.x modules and change the hudi format in original hudi-spark module to hudi_v1 format. * Manually tested on Spark 3.1.2 and Spark 3.2.0 SQL. * Added a README.md file under hudi-spark-datasource module.
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
|
||||
package org.apache.hudi.functional
|
||||
|
||||
import java.util.Properties
|
||||
|
||||
import org.apache.hadoop.fs.Path
|
||||
import org.apache.hudi.DataSourceWriteOptions._
|
||||
import org.apache.hudi.common.config.HoodieMetadataConfig
|
||||
|
||||
@@ -65,7 +65,7 @@ class TestAlterTable extends TestHoodieSqlBase {
|
||||
spark.sql(s"alter table $newTableName add columns(ext0 string)")
|
||||
val table = spark.sessionState.catalog.getTableMetadata(new TableIdentifier(newTableName))
|
||||
assertResult(Seq("id", "name", "price", "ts", "ext0")) {
|
||||
HoodieSqlUtils.removeMetaFields(table.schema).fields.map(_.name)
|
||||
HoodieSqlCommonUtils.removeMetaFields(table.schema).fields.map(_.name)
|
||||
}
|
||||
checkAnswer(s"select id, name, price, ts, ext0 from $newTableName")(
|
||||
Seq(1, "a1", 10.0, 1000, null)
|
||||
|
||||
Reference in New Issue
Block a user