rahil-c commented on code in PR #17475:
URL: https://github.com/apache/hudi/pull/17475#discussion_r2606937790


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/avro/HoodieSchemaInternalConverters.scala:
##########
@@ -0,0 +1,242 @@
+/*
+ * 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.spark.sql.avro

Review Comment:
   Actually there is one cavaet. Originally I ran into an issue for one of the 
spark versions(spark 3.3) the TimestampNTZType class was private and I was 
getting compilation errors, which caused me to have make multiple converters 
for each spark version and alot more code. See this commit 
https://github.com/apache/hudi/pull/17475/commits/150fce772ff8452fa77cc1a8c3b4f7dfb8b8837c
   
   What allowed me to reduce code to not maintain multiple spark version code 
was the ability to access the private TimestampNTZType class even on spark 3.3, 
and this seems to be achieved by using the same package 
`org.apache.spark.sql.avro` as where the TimestampNTZType is located  and 
having my converter class be private with.
   ```
   @DeveloperApi
   private[sql] object HoodieSchemaInternalConverters extends 
HoodieSchemaConverters {
   ```
   I think for now lets keep this to follow same pattern as avro



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