jiangxt2 commented on code in PR #13493:
URL: https://github.com/apache/gravitino/pull/13493#discussion_r4129331737


##########
spark-connector/v3.5/spark/src/main/java/org/apache/gravitino/spark/connector/jdbc/doris/DorisPhysicalSchemaValidator35.java:
##########
@@ -0,0 +1,364 @@
+/*
+ * 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.gravitino.spark.connector.jdbc.doris;
+
+import com.google.common.collect.ImmutableSet;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.Set;
+import org.apache.gravitino.rel.Column;
+import org.apache.gravitino.rel.Table;
+import org.apache.gravitino.rel.types.Type;
+import org.apache.gravitino.rel.types.Types;
+import org.apache.gravitino.spark.connector.SparkTypeConverter;
+import org.apache.spark.sql.connector.catalog.Identifier;
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.StructField;
+import org.apache.spark.sql.types.StructType;
+
+/** Validates one authorized Doris table against FE and JDBC physical 
metadata. */
+final class DorisPhysicalSchemaValidator35 {
+
+  private static final Set<String> ORDINARY_TYPES =

Review Comment:
   Thanks for highlighting the coverage gap. The Doris 3.0.6.2 IT now reads 
`INT`, `VARCHAR`, `BOOLEAN`, `DECIMAL`, `STRING`, `DOUBLE`, `DATEV2`, and plain 
`DATETIME`, with nullable/`NOT NULL` columns and actual `NULL` values; the raw 
`DATETIME` value matches direct JDBC. Real runs exposed `CHAR`/`FLOAT` 
logical-versus-Spark mismatches, so those types are rejected. I added 
`DECIMALV3` to the allowlist using its existing signature normalization and 
normalized plain `DATETIME` to precision 0; a unit test still rejects higher 
precision when JDBC precision is missing. The docs state that this focused 
matrix does not certify every allowlisted spelling. Final validation passed 239 
Spark 3.5 unit tests and 6 Doris IT tests, with no skips.



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