You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/27 09:35:35 UTC

[GitHub] [flink] danny0405 commented on a change in pull request #13771: [FLINK-19789][hive] Migrate Hive connector to new table source sink interface

danny0405 commented on a change in pull request #13771:
URL: https://github.com/apache/flink/pull/13771#discussion_r512539028



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveTableSource.java
##########
@@ -346,63 +329,30 @@ private TableSchema getProducedTableSchema() {
 	}
 
 	@Override
-	public boolean isLimitPushedDown() {
-		return isLimitPushDown;
+	public void applyLimit(long limit) {
+		this.limit = limit;
 	}
 
 	@Override
-	public TableSource<RowData> applyLimit(long limit) {
-		return new HiveTableSource(
-				jobConf,
-				flinkConf,
-				tablePath,
-				catalogTable,
-				remainingPartitions,
-				hiveVersion,
-				partitionPruned,
-				projectedFields,
-				true,
-				limit);
+	public Optional<List<Map<String, String>>> listPartitions() {
+		return Optional.empty();
 	}
 
 	@Override
-	public List<Map<String, String>> getPartitions() {
-		throw new UnsupportedOperationException(
-				"Please use Catalog API to retrieve all partitions of a table");
+	public void applyPartitions(List<Map<String, String>> remainingPartitions) {
+		if (catalogTable.getPartitionKeys() != null && catalogTable.getPartitionKeys().size() != 0) {
+			this.remainingPartitions = remainingPartitions;
+		}

Review comment:
       Should we report error for the else branch ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org