gh-yzou commented on code in PR #1147:
URL: https://github.com/apache/polaris/pull/1147#discussion_r1995963105


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/GenericTableEntity.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.polaris.core.entity;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.apache.iceberg.catalog.Namespace;
+import org.apache.iceberg.catalog.TableIdentifier;
+import org.apache.iceberg.rest.RESTUtil;
+
+/**
+ * A {@link PolarisEntity} implementation for generic tables. These tables are 
not Iceberg-like in
+ * that they may not have a schema or base location. Similarly to {@link 
IcebergTableLikeEntity}
+ * however, these tables have an identifier and a parent namespace.
+ */
+public class GenericTableEntity extends PolarisEntity {

Review Comment:
   I believe we did reach to a consensus about "generic", because we do want to 
potentially allow this set of APIs to manage various types of table, includes 
iceberg. 
   
   When I look at the ICEBERG_TABLE_LIKE_ENTITY, and GENERIC_TABLE_ENTITY, it 
is literally two different ways to represent a table, and based on the 
representation, different operations can be performed.  Like Eric has 
mentioned, the Generic representation only takes a format, and the format could 
potentially be iceberg in the future. Or even step back, we can also allow 
Iceberg as a format, the only thing is we can not provide full Iceberg support 
(commit coordination) with this representation.
   
   For name like unstructured, i have the same feeling like Eric, which is kind 
of too general, almost indicates just a set of files to me.
   
   Therefore i do think generic fits better for the case we intended to support.



##########
polaris-core/src/main/java/org/apache/polaris/core/entity/GenericTableEntity.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.polaris.core.entity;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.apache.iceberg.catalog.Namespace;
+import org.apache.iceberg.catalog.TableIdentifier;
+import org.apache.iceberg.rest.RESTUtil;
+
+/**
+ * A {@link PolarisEntity} implementation for generic tables. These tables are 
not Iceberg-like in
+ * that they may not have a schema or base location. Similarly to {@link 
IcebergTableLikeEntity}
+ * however, these tables have an identifier and a parent namespace.
+ */
+public class GenericTableEntity extends PolarisEntity {
+
+  public static final String FORMAT_KEY = "format";
+
+  public GenericTableEntity(PolarisBaseEntity sourceEntity) {
+    super(sourceEntity);
+  }
+
+  public static GenericTableEntity of(PolarisBaseEntity sourceEntity) {
+    if (sourceEntity != null) {
+      return new GenericTableEntity(sourceEntity);
+    }
+    return null;
+  }
+
+  @JsonIgnore
+  public String getFormat() {
+    return getInternalPropertiesAsMap().get(GenericTableEntity.FORMAT_KEY);

Review Comment:
   I see.



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