Skip to content

Commit a057687

Browse files
committed
fix format
1 parent 25c2511 commit a057687

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

common/src/main/scala/org/apache/comet/codegen/CometBatchKernelCodegen.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ object CometBatchKernelCodegen extends Logging with CometExprTraitShim {
123123
//
124124
// TODO(hof-lambdas): the `CodegenFallback` rule rejects `NamedLambdaVariable`, which flags
125125
// every higher-order function (`ArrayTransform`, `ArrayAggregate`, `ArrayExists`,
126-
// `ArrayFilter`, `ZipWith`, `MapFilter`, etc.) as unsupported. The variable is `CodegenFallback`
127-
// only in isolation; the surrounding HOF binds its `value` field inline as part of its own
126+
// `ArrayFilter`, `ZipWith`, `MapFilter`, etc.) as unsupported. The variable is
127+
// `CodegenFallback` only in isolation; the surrounding HOF binds its `value` field inline
128+
// as part of its own
128129
// `doGenCode`, and the resulting Java compiles fine. Loosening this would unlock
129130
// element-iteration over `Array<Struct>` / `Array<Map>` which today have no fuzz path
130131
// (`array_max` doesn't apply to non-comparable elements, generators are blocked above). Plan:

common/src/main/scala/org/apache/comet/codegen/CometBatchKernelCodegenInput.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ private[codegen] object CometBatchKernelCodegenInput {
604604
private def emitArrayElementGetter(path: String, spec: ArrayColumnSpec): String = {
605605
val elemPath = s"${path}_e"
606606
val nullGuard =
607-
if (spec.element.nullable) s" if (isNullAt(i)) return null;\n"
607+
if (spec.element.nullable) " if (isNullAt(i)) return null;\n"
608608
else ""
609609
spec.element match {
610610
case _: ScalarColumnSpec =>

spark/src/test/scala/org/apache/comet/CometCodegenDispatchSmokeSuite.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,8 +1162,7 @@ class CometCodegenDispatchSmokeSuite extends CometTestBase with AdaptiveSparkPla
11621162
// pins one reference-type variant so the fix can be verified per type.
11631163
// =============================================================================================
11641164

1165-
test(
1166-
"array_max(flatten(arr)) on Array<Array<Binary>> with null inner Binary returns null") {
1165+
test("array_max(flatten(arr)) on Array<Array<Binary>> with null inner Binary returns null") {
11671166
spark.udf.register("idBin", (b: Array[Byte]) => b)
11681167
withArrayTable(
11691168
"ARRAY<ARRAY<BINARY>>",
@@ -1176,8 +1175,7 @@ class CometCodegenDispatchSmokeSuite extends CometTestBase with AdaptiveSparkPla
11761175
}
11771176
}
11781177

1179-
test(
1180-
"array_max(flatten(arr)) on Array<Array<String>> with null inner String returns null") {
1178+
test("array_max(flatten(arr)) on Array<Array<String>> with null inner String returns null") {
11811179
spark.udf.register("idStr", (s: String) => s)
11821180
withArrayTable(
11831181
"ARRAY<ARRAY<STRING>>",

0 commit comments

Comments
 (0)