andygrove commented on code in PR #5738:
URL: https://github.com/apache/datafusion-comet/pull/5738#discussion_r3997732921


##########
spark/src/test/resources/sql-tests/expressions/datetime/extract_time.sql:
##########
@@ -0,0 +1,62 @@
+-- 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.
+
+-- MinSparkVersion: 4.1
+-- MaxSparkVersion: 4.1

Review Comment:
   Spark 4.2.0 still lowers `SecondsOfTimeWithFraction` to `DecimalType(8, 6)` 
with the same `getSecondsOfTimeWithFraction` body (checked at the `v4.2.0` 
tag). Only Spark master has moved to `DecimalType(2 + precision, precision)`. 
Since the shim is in `spark-4.1+` and the `spark-4.2` profile pins 4.2.0, the 
native path runs on 4.2 but this fixture skips it, so the `TIME(0)` through 
`TIME(5)` cases get no 4.2 coverage. Could you drop the `MaxSparkVersion` line 
(or set it to 4.2) so the Spark 4.2 `[expressions]` job runs this, and reword 
the comment on line 23 to say master rather than "later releases"?



##########
docs/source/user-guide/latest/expressions.md:
##########
@@ -269,7 +269,7 @@ The type-name conversion functions (`bigint`, `binary`, 
`boolean`, `date`, `deci
 | `dayofmonth` | ✅ | Native |  |
 | `dayofweek` | ✅ | Native |  |
 | `dayofyear` | ✅ | Native |  |
-| `extract` | ✅ | — |  |
+| `extract` | ✅ | — | `SECOND FROM TIME` is native for Spark 4.1 
(`Decimal(8,6)` output) |

Review Comment:
   Same point: this is native on Spark 4.1 and 4.2, so "for Spark 4.1+" would 
be accurate. The comment at `CometExprShim.scala:69` could say the same.



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