zhaoxuan1994 commented on code in PR #588:
URL: https://github.com/apache/iceberg-cpp/pull/588#discussion_r2929523444


##########
src/iceberg/puffin/types.h:
##########
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+/// \file iceberg/puffin/types.h
+/// Standard blob types and properties for Puffin files.
+
+#include <string_view>
+
+namespace iceberg::puffin {
+
+/// \brief Standard blob types defined by the Iceberg specification.
+struct StandardBlobTypes {
+  /// A serialized form of a "compact" Theta sketch produced by the
+  /// Apache DataSketches library.
+  static constexpr std::string_view kApacheDatasketchesThetaV1 =
+      "apache-datasketches-theta-v1";
+
+  /// A serialized deletion vector according to the Iceberg spec.
+  static constexpr std::string_view kDeletionVectorV1 = "deletion-vector-v1";
+};

Review Comment:
   Per the Puffin spec, type is a "JSON string" field. The spec lists known 
blob types under "Blob types" but doesn't restrict the field to only those 
values — new types can be added as the spec evolves. Both the Java and Rust 
implementations use String for this field rather than an enum. 
StandardBlobTypes provides well-known constants to avoid typos while keeping 
the field open for future extensibility.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to