Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
leaves12138 committed Dec 1, 2023
1 parent f92a122 commit b23f09d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/content/migration/migration-from-hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ migrate_table
--src-type hive \
--table <database.table-name> \
[--catalog-conf <paimon-catalog-conf> [--catalog-conf <paimon-catalog-conf> ...]] \
[--table-conf <paimon-table-sink-conf> [--table-conf <paimon-table-sink-conf> ...]]
[--options <paimon-table-conf [,paimon-table-conf ...]> ]
```
Example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Optional<Action> create(MultipleParameterTool params) {
String connector = params.get("src-type");
String sourceHiveTable = params.get("table");
Map<String, String> catalogConfig = optionalConfigMap(params, "catalog-conf");
String tableConf = params.get("tblproperties");
String tableConf = params.get("options");

MigrateTableAction migrateTableAction =
new MigrateTableAction(
Expand All @@ -57,6 +57,6 @@ public void printHelp() {
" migrate_table --warehouse <warehouse-path> --src-type hive "
+ "--table <database.table_name> "
+ "[--catalog-conf <key>=<value] "
+ "[--tblproperties <key>=<value>,<key>=<value>,...]");
+ "[--options <key>=<value>,<key>=<value>,...]");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class MigrateTableProcedure extends BaseProcedure {
new ProcedureParameter[] {
ProcedureParameter.required("src_type", StringType),
ProcedureParameter.required("table", StringType),
ProcedureParameter.optional("tblproperties", StringType)
ProcedureParameter.optional("options", StringType)
};

private static final StructType OUTPUT_TYPE =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MigrateTableProcedureTest extends PaimonHiveTestBase {
spark.sql(s"INSERT INTO hive_tbl VALUES ('1', 'a', 'p1'), ('2', 'b', 'p2')")

spark.sql(
s"CALL sys.migrate_table(src_type => 'hive', table => '$hiveDbName.hive_tbl', tblproperties => 'file.format=$format')")
s"CALL sys.migrate_table(src_type => 'hive', table => '$hiveDbName.hive_tbl', options => 'file.format=$format')")

checkAnswer(
spark.sql(s"SELECT * FROM hive_tbl ORDER BY id"),
Expand All @@ -58,7 +58,7 @@ class MigrateTableProcedureTest extends PaimonHiveTestBase {
spark.sql(s"INSERT INTO hive_tbl VALUES ('1', 'a', 'p1'), ('2', 'b', 'p2')")

spark.sql(
s"CALL sys.migrate_table(src_type => 'hive', table => '$hiveDbName.hive_tbl', tblproperties => 'file.format=$format')")
s"CALL sys.migrate_table(src_type => 'hive', table => '$hiveDbName.hive_tbl', options => 'file.format=$format')")

checkAnswer(
spark.sql(s"SELECT * FROM hive_tbl ORDER BY id"),
Expand Down

0 comments on commit b23f09d

Please sign in to comment.