andygrove commented on code in PR #5039: URL: https://github.com/apache/datafusion-comet/pull/5039#discussion_r3659503447
########## spark/src/test/resources/sql-tests/expressions/datetime/make_interval.sql: ########## @@ -0,0 +1,46 @@ +-- 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. + +-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false + +statement +CREATE TABLE test_make_interval( + years int, + months int, + weeks int, + days int, + hours int, + mins int, + secs decimal(38, 6)) USING parquet Review Comment: `secs` here is `decimal(38, 6)` but Spark's `MakeInterval.inputTypes` is `Decimal(18, 6)`. All the values you insert fit either type so this works, but a reader might reasonably assume `Decimal(38, 6)` inputs are natively supported when in fact Spark casts down to `Decimal(18, 6)` before calling `makeInterval`. Consider using `decimal(18, 6)` here so the fixture matches the actual supported input type. ########## spark/src/test/resources/sql-tests/expressions/datetime/make_interval.sql: ########## @@ -0,0 +1,46 @@ +-- 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. + +-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false Review Comment: Is `spark.comet.exec.scalaUDF.codegen.enabled=false` actually needed for this fixture? `CometMakeInterval` extends `CometExpressionSerde`, not `CometCodegenDispatch`, so I don't think codegen dispatch is in play here. If it's not load-bearing, dropping the directive would keep the fixture minimal. Same question for `make_interval_ansi.sql`. -- 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]
