comphead commented on code in PR #6004: URL: https://github.com/apache/datafusion-comet/pull/6004#discussion_r4042595113
########## spark/src/test/scala/org/apache/comet/DataTypeSupportSuite.scala: ########## @@ -0,0 +1,140 @@ +/* + * 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.comet + +import org.scalatest.funsuite.AnyFunSuite + +import org.apache.spark.sql.types._ + +import org.apache.comet.DataTypeSupport.{findDuplicateStructFieldIds, findDuplicateStructFieldNames} + +/** + * Unit tests for the recursive struct checks shared by the scan rule, the operator conversion + * gate and the Arrow cache serializer. Each of those reaches the same two questions -- can Java + * Arrow tell these struct children apart, and can Spark's Parquet reader resolve them one-to-one + * -- so the answers live in one place and are pinned here. + */ +class DataTypeSupportSuite extends AnyFunSuite { Review Comment: Resolved in 7fe93280, but by **removing the suite rather than registering it** — flagging that explicitly since you'd already verified the registration as fixed and I don't want this to read as a regression. A cleanup pass found `DataTypeSupportSuite` largely duplicated [`CometNativeShuffleSuite:712`](https://github.com/apache/datafusion-comet/blob/main/spark/src/test/scala/org/apache/comet/exec/CometNativeShuffleSuite.scala#L712), which already asserts duplicate names through `isSchemaSupported`, the array/map recursion, and the `a`-vs-`A` negative. Only two assertions were genuinely new — the malformed field id and the mixed present/absent id — and both moved into the `CometScanRuleSuite` table. So the coverage still runs in CI: `org.apache.comet.rules.CometScanRuleSuite` is registered in both matrices already, and it exercises the predicates through the real entry point rather than directly. `check-suites.py` passes, one file and two registrations fewer. Your underlying point stands and was the right catch — a new suite that CI never runs is worse than no suite. -- 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]
