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


##########
src/iceberg/avro/avro_schema_util_internal.h:
##########
@@ -0,0 +1,58 @@
+/*
+ * 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
+
+#include <stack>
+
+#include <avro/Node.hh>
+
+#include "iceberg/result.h"
+#include "iceberg/type.h"
+
+namespace iceberg::avro {
+
+/// \brief A visitor that converts an Iceberg type to an Avro node.
+class ToAvroNodeVisitor {
+ public:
+  Status Visit(const BooleanType& type, ::avro::NodePtr* node);
+  Status Visit(const IntType& type, ::avro::NodePtr* node);
+  Status Visit(const LongType& type, ::avro::NodePtr* node);
+  Status Visit(const FloatType& type, ::avro::NodePtr* node);
+  Status Visit(const DoubleType& type, ::avro::NodePtr* node);
+  Status Visit(const DecimalType& type, ::avro::NodePtr* node);
+  Status Visit(const DateType& type, ::avro::NodePtr* node);
+  Status Visit(const TimeType& type, ::avro::NodePtr* node);
+  Status Visit(const TimestampType& type, ::avro::NodePtr* node);
+  Status Visit(const TimestampTzType& type, ::avro::NodePtr* node);
+  Status Visit(const StringType& type, ::avro::NodePtr* node);
+  Status Visit(const UuidType& type, ::avro::NodePtr* node);
+  Status Visit(const FixedType& type, ::avro::NodePtr* node);
+  Status Visit(const BinaryType& type, ::avro::NodePtr* node);
+  Status Visit(const StructType& type, ::avro::NodePtr* node);
+  Status Visit(const ListType& type, ::avro::NodePtr* node);
+  Status Visit(const MapType& type, ::avro::NodePtr* node);
+  Status Visit(const SchemaField& field, ::avro::NodePtr* node);

Review Comment:
   I think this is fine because the file is also internal. We don't want to 
expose any `avro::` and `arrow::` namespace.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to