wgtmac commented on code in PR #532:
URL: https://github.com/apache/iceberg-cpp/pull/532#discussion_r2749151326


##########
src/iceberg/expression/json_serde.cc:
##########
@@ -0,0 +1,150 @@
+/*
+ * 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.
+ */
+
+#include <format>
+#include <ranges>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include <nlohmann/json.hpp>
+
+#include "iceberg/expression/json_serde_internal.h"
+#include "iceberg/expression/literal.h"
+#include "iceberg/util/checked_cast.h"
+#include "iceberg/util/json_util_internal.h"
+#include "iceberg/util/macros.h"
+
+namespace iceberg {
+namespace {
+// Expression type strings
+constexpr std::string_view kTypeTrue = "true";
+constexpr std::string_view kTypeFalse = "false";
+constexpr std::string_view kTypeEq = "eq";
+constexpr std::string_view kTypeAnd = "and";
+constexpr std::string_view kTypeOr = "or";
+constexpr std::string_view kTypeNot = "not";
+constexpr std::string_view kTypeIn = "in";
+constexpr std::string_view kTypeNotIn = "not-in";
+constexpr std::string_view kTypeLt = "lt";
+constexpr std::string_view kTypeLtEq = "lt-eq";
+constexpr std::string_view kTypeGt = "gt";
+constexpr std::string_view kTypeGtEq = "gt-eq";
+constexpr std::string_view kTypeNotEq = "not-eq";
+constexpr std::string_view kTypeStartsWith = "starts-with";
+constexpr std::string_view kTypeNotStartsWith = "not-starts-with";
+constexpr std::string_view kTypeIsNull = "is-null";
+constexpr std::string_view kTypeNotNull = "not-null";
+constexpr std::string_view kTypeIsNan = "is-nan";
+constexpr std::string_view kTypeNotNan = "not-nan";
+constexpr std::string_view kCount = "count";

Review Comment:
   Why the above use `kType` prefix but below does not?



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