Skip to content

Commit 552ad3d

Browse files
author
z00484332
committed
[HUDI-5000] Support schema evolution for Hive/presto
1 parent d76cb8d commit 552ad3d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/functional/TestHiveTableSchemaEvolution.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18+
1819
package org.apache.hudi.functional;
1920

2021
import org.apache.hadoop.fs.Path;
@@ -83,7 +84,7 @@ public void testCopyOnWriteTableForHive() throws Exception {
8384
if (HoodieSparkUtils.gteqSpark3_1()) {
8485
sparkSession.sql("set hoodie.schema.on.read.enable=true");
8586
String path = new Path(file.getCanonicalPath()).toUri().toString();
86-
sparkSession.sql("create table " + tableName + "(col0 int, col1 float, col2 string) using hudi options(type='cow', primaryKey='col0', preCombineField='col1') location '" + path +"'");
87+
sparkSession.sql("create table " + tableName + "(col0 int, col1 float, col2 string) using hudi options(type='cow', primaryKey='col0', preCombineField='col1') location '" + path + "'");
8788
sparkSession.sql("insert into " + tableName + " values(1, 1.1, 'text')");
8889
sparkSession.sql("alter table " + tableName + " alter column col1 type double");
8990
sparkSession.sql("alter table " + tableName + " rename column col2 to aaa");
@@ -104,7 +105,7 @@ public void testMergeOnReadTableForHive() throws Exception {
104105
if (HoodieSparkUtils.gteqSpark3_1()) {
105106
sparkSession.sql("set hoodie.schema.on.read.enable=true");
106107
String path = new Path(file.getCanonicalPath()).toUri().toString();
107-
sparkSession.sql("create table " + tableName + "(col0 int, col1 float, col2 string) using hudi options(type='cow', primaryKey='col0', preCombineField='col1') location '" + path +"'");
108+
sparkSession.sql("create table " + tableName + "(col0 int, col1 float, col2 string) using hudi options(type='cow', primaryKey='col0', preCombineField='col1') location '" + path + "'");
108109
sparkSession.sql("insert into " + tableName + " values(1, 1.1, 'text')");
109110
sparkSession.sql("insert into " + tableName + " values(2, 1.2, 'text2')");
110111
sparkSession.sql("alter table " + tableName + " alter column col1 type double");

0 commit comments

Comments
 (0)