XuMingmin commented on a change in pull request #1127: [CALCITE-2913] add a 
KafkaAdapter for Stream
URL: https://github.com/apache/calcite/pull/1127#discussion_r283086975
 
 

 ##########
 File path: 
kafka/src/main/java/org/apache/calcite/adapter/kafka/KafkaTableFactory.java
 ##########
 @@ -0,0 +1,86 @@
+/*
+ * 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
+ *
+ * http://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.calcite.adapter.kafka;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.schema.SchemaPlus;
+import org.apache.calcite.schema.Table;
+import org.apache.calcite.schema.TableFactory;
+
+import org.apache.kafka.clients.consumer.Consumer;
+import org.apache.kafka.clients.consumer.OffsetResetStrategy;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+
+/**
+ * Implementation of {@link TableFactory} for Kafka. Currently a Kafka topic 
is mapping
+ * to a STREAM table.
+ */
+public class KafkaTableFactory implements TableFactory {
+  public KafkaTableFactory() {
+  }
+
+  /** Creates a Table.
+   *  @param schema Schema this table belongs to
+   * @param name Name of this table
+   * @param operand The "operand" JSON property
+   * @param rowType Row type. Specified if the "columns" JSON property.
+   */
+  @Override public Table create(final SchemaPlus schema, final String name, 
final Map operand,
 
 Review comment:
   u're right, updated

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to