ahmedabu98 commented on code in PR #35223:
URL: https://github.com/apache/beam/pull/35223#discussion_r2138259428


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/catalog/ReadOnlyCatalogManager.java:
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.beam.sdk.extensions.sql.meta.catalog;
+
+import java.util.Map;
+import org.apache.beam.sdk.extensions.sql.meta.provider.TableProvider;
+import 
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
+import org.checkerframework.checker.nullness.qual.Nullable;
+
+public class ReadOnlyCatalogManager implements CatalogManager {

Review Comment:
   Renamed



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/catalog/CatalogManager.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.beam.sdk.extensions.sql.meta.catalog;
+
+import java.util.Map;
+import org.apache.beam.sdk.extensions.sql.meta.provider.TableProvider;
+import org.checkerframework.checker.nullness.qual.Nullable;
+
+public interface CatalogManager {
+  void createCatalog(String name, String type, Map<String, String> properties);
+
+  void useCatalog(String name);
+
+  Catalog currentCatalog();
+
+  @Nullable
+  Catalog getCatalog(String name);
+
+  void removeCatalog(String name);

Review Comment:
   Done



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamSqlCli.java:
##########
@@ -35,14 +36,19 @@ public class BeamSqlCli {
   /** The store which persists all the table meta data. */
   private MetaStore metaStore;
 
-  public BeamSqlCli metaStore(MetaStore metaStore) {
-    return metaStore(metaStore, false, PipelineOptionsFactory.create());
+  public BeamSqlCli catalogManager(CatalogManager catalogManager) {

Review Comment:
   I'm not familiar with the entry points of Beam SQL, but our public docs [1], 
[2] seem to show only `SqlTransform`. I'm on board with marking it `@Internal`
   
   [1] https://beam.apache.org/documentation/dsls/sql/walkthrough/
   [2] https://beam.apache.org/documentation/dsls/sql/overview/



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to