Skip to content

Commit 97e3c20

Browse files
committed
fix
1 parent 9133e26 commit 97e3c20

File tree

13 files changed

+9
-577
lines changed

13 files changed

+9
-577
lines changed

docs/content/flink/procedures.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -532,50 +532,20 @@ All available procedures are listed below.
532532
<tr>
533533
<td>migrate_table</td>
534534
<td>
535-
-- for Flink 1.18<br/>
536-
-- migrate hive table to a paimon table.<br/>
537-
CALL [catalog.]sys.migrate_table('connector', 'tableIdentifier', 'options'[, &ltparallelism&gt])<br/><br/>
538-
-- for Flink 1.19 and later<br/>
539535
-- migrate hive table to a paimon table.<br/>
540536
CALL [catalog.]sys.migrate_table(connector => 'connector', source_table => 'tableIdentifier', options => 'options'[, &ltparallelism => parallelism&gt])<br/><br/>
541537
</td>
542538
<td>
543539
To migrate hive table to a paimon table. Argument:
544540
<li>connector: the origin table's type to be migrated, such as hive. Cannot be empty.</li>
545541
<li>source_table: name of the origin table to be migrated. Cannot be empty.</li>
542+
<li>target_table: name of the target paimon table to migrate. If not set would keep the same name with origin table</li>
546543
<li>options: the table options of the paimon table to migrate.</li>
547544
<li>parallelism: the parallelism for migrate process, default is core numbers of machine.</li>
548-
</td>
549-
<td>
550-
-- for Flink 1.18<br/>
551-
CALL sys.migrate_table('hive', 'db01.t1', 'file.format=parquet', 6)
552-
-- for Flink 1.19 and later<br/>
553-
CALL sys.migrate_table(connector => 'hive', source_table => 'db01.t1', options => 'file.format=parquet', parallelism => 6)
554-
</td>
555-
</tr>
556-
<tr>
557-
<td>migrate_file</td>
558-
<td>
559-
-- for Flink 1.18<br/>
560-
-- migrate files from hive table to a paimon table.<br/>
561-
CALL [catalog.]sys.migrate_file('connector', 'srcTableIdentifier', 'destTableIdentifier', [, &ltdelete_origin&gt, &ltparallelism&gt])<br/><br/>
562-
-- for Flink 1.19 and later<br/>
563-
-- migrate hive table to a paimon table.<br/>
564-
CALL [catalog.]sys.migrate_file(connector => 'connector', source_table => 'srcTableIdentifier', target_table => 'destTableIdentifier'[, &ltdelete_origin => bool&gt, &ltparallelism => parallelism&gt])<br/><br/>
565-
</td>
566-
<td>
567-
To migrate files from hive table to a paimon table. Argument:
568-
<li>connector: the origin table's type to be migrated, such as hive. Cannot be empty.</li>
569-
<li>source_table: name of the origin table to migrate. Cannot be empty.</li>
570-
<li>target_table: name of the target table to be migrated. Cannot be empty.</li>
571545
<li>delete_origin: If had set target_table, can set delete_origin to decide whether delete the origin table metadata from hms after migrate. Default is true</li>
572-
<li>parallelism: the parallelism for migrate process, default is core numbers of machine.</li>
573546
</td>
574547
<td>
575-
-- for Flink 1.18<br/>
576-
CALL sys.migrate_file('hive', 'default.T', 'default.T2', true, 6)
577-
-- for Flink 1.19 and later<br/>
578-
CALL sys.migrate_file(connector => 'hive', source_table => 'default.T', target_table => 'default.T2', delete_origin => true, parallelism => 6)
548+
CALL sys.migrate_table(connector => 'hive', source_table => 'db01.t1', options => 'file.format=parquet', parallelism => 6)
579549
</td>
580550
</tr>
581551
<tr>

docs/content/spark/procedures.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,6 @@ This section introduce all available spark procedures about paimon.
230230
</td>
231231
<td>CALL sys.migrate_table(source_type => 'hive', table => 'default.T', options => 'file.format=parquet', options_map => map('k1','v1'), parallelism => 6)</td>
232232
</tr>
233-
<tr>
234-
<td>migrate_file</td>
235-
<td>
236-
Migrate from hive table to a paimon table. Arguments:
237-
<li>source_type: the origin table's type to be migrated, such as hive. Cannot be empty.</li>
238-
<li>source_table: name of the origin table to migrate. Cannot be empty.</li>
239-
<li>target_table: name of the target table to be migrated. Cannot be empty.</li>
240-
<li>delete_origin: If had set target_table, can set delete_origin to decide whether delete the origin table metadata from hms after migrate. Default is true</li>
241-
<li>parallelism: the parallelism for migrate process, default is core numbers of machine.</li>
242-
</td>
243-
<td>CALL sys.migrate_file(connector => 'hive', source_table => 'default.hivetable', target_table => 'default.paimontable', delete_origin => true, parallelism => 6)</td>
244-
</tr>
245233
<tr>
246234
<td>remove_orphan_files</td>
247235
<td>

paimon-flink/paimon-flink-1.18/src/main/java/org/apache/paimon/flink/procedure/MigrateFileProcedure.java

Lines changed: 0 additions & 112 deletions
This file was deleted.

paimon-flink/paimon-flink-1.18/src/test/java/org/apache/paimon/flink/procedure/ProcedurePositionalArgumentsITCase.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,6 @@ public void testMigrateProcedures() {
418418
.hasMessageContaining("Only support Hive Catalog.");
419419
assertThatThrownBy(() -> sql("CALL sys.migrate_table('hive', 'default.T', '')"))
420420
.hasMessageContaining("Only support Hive Catalog.");
421-
assertThatThrownBy(() -> sql("CALL sys.migrate_file('hive', 'default.T', 'default.S')"))
422-
.hasMessageContaining("Only support Hive Catalog.");
423421
}
424422

425423
@Test

paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/MigrateFileAction.java

Lines changed: 0 additions & 66 deletions
This file was deleted.

paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/MigrateFileActionFactory.java

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)