-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-21727][hive] Support DDL in HiveParser
- Loading branch information
1 parent
64f6e18
commit 5c3eccb
Showing
23 changed files
with
5,664 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...-hive/src/main/java/org/apache/flink/table/planner/delegation/hive/CreateTableASDesc.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.table.planner.delegation.hive; | ||
|
||
import org.apache.hadoop.hive.ql.parse.ASTNode; | ||
|
||
import java.io.Serializable; | ||
|
||
/** A desc for CTAS. */ | ||
public class CreateTableASDesc implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final HiveParserCreateTableDesc createTableDesc; | ||
private final ASTNode query; | ||
|
||
public CreateTableASDesc(HiveParserCreateTableDesc createTableDesc, ASTNode query) { | ||
this.createTableDesc = createTableDesc; | ||
this.query = query; | ||
} | ||
|
||
public HiveParserCreateTableDesc getCreateTableDesc() { | ||
return createTableDesc; | ||
} | ||
|
||
public ASTNode getQuery() { | ||
return query; | ||
} | ||
} |
808 changes: 808 additions & 0 deletions
808
...e/src/main/java/org/apache/flink/table/planner/delegation/hive/DDLOperationConverter.java
Large diffs are not rendered by default.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
...-hive/src/main/java/org/apache/flink/table/planner/delegation/hive/DropPartitionDesc.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.flink.table.planner.delegation.hive; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** Desc to represent DROP PARTITIONS. */ | ||
public class DropPartitionDesc implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final String dbName; | ||
private final String tableName; | ||
private final List<Map<String, String>> specs; | ||
private final boolean ifExists; | ||
|
||
public DropPartitionDesc( | ||
String dbName, String tableName, List<Map<String, String>> specs, boolean ifExists) { | ||
this.dbName = dbName; | ||
this.tableName = tableName; | ||
this.specs = specs; | ||
this.ifExists = ifExists; | ||
} | ||
|
||
public String getDbName() { | ||
return dbName; | ||
} | ||
|
||
public String getTableName() { | ||
return tableName; | ||
} | ||
|
||
public List<Map<String, String>> getSpecs() { | ||
return specs; | ||
} | ||
|
||
public boolean ifExists() { | ||
return ifExists; | ||
} | ||
} |
Oops, something went wrong.