Skip to content

Commit d2de9c3

Browse files
committed
Fix linting
1 parent 0c6f494 commit d2de9c3

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/functions/Reducer.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
*
2424
* @see ReducibleFunction
2525
*
26-
* A user defined function f_source(x) is 'reducible' on another user_defined function f_target(x) if
26+
* A user defined function f_source(x) is 'reducible' on another user_defined function
27+
* f_target(x) if
2728
* <ul>
28-
* <li> There exists a reducer function r(x) such that r(f_source(x)) = f_target(x) for all input x. </li>
29-
* <li> More generally, there exists two reducer functions r1(x) and r2(x) such that
30-
* r1(f_source(x)) = r2(f_target(x)) for all input x. </li>
29+
* <li> There exists a reducer function r(x) such that r(f_source(x)) = f_target(x) for
30+
* all input x, or </li>
31+
* <li> More generally, there exists reducer functions r1(x) and r2(x) such that
32+
* r1(f_source(x)) = r2(f_target(x)) for all input x. </li>
3133
* </ul>
3234
*
3335
* @param <I> reducer input type
@@ -36,5 +38,5 @@
3638
*/
3739
@Evolving
3840
public interface Reducer<I, O> {
39-
O reduce(I arg);
41+
O reduce(I arg);
4042
}

sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/functions/ReducibleFunction.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
*
2424
* A function f_source(x) is 'reducible' on another function f_target(x) if
2525
* <ul>
26-
* <li> There exists a reducer function r(x) such that r(f_source(x)) = f_target(x) for all input x. </li>
27-
* <li> More generally, there exists two reducer functions r1(x) and r2(x) such that
26+
* <li> There exists a reducer function r(x) such that r(f_source(x)) = f_target(x)
27+
* for all input x, or </li>
28+
* <li> More generally, there exists reducer functions r1(x) and r2(x) such that
2829
* r1(f_source(x)) = r2(f_target(x)) for all input x. </li>
2930
* </ul>
3031
* <p>
@@ -62,7 +63,8 @@ public interface ReducibleFunction<I, O> {
6263
/**
6364
* This method is for bucket functions.
6465
*
65-
* If this bucket function is 'reducible' on another bucket function, return the {@link Reducer} function.
66+
* If this bucket function is 'reducible' on another bucket function,
67+
* return the {@link Reducer} function.
6668
* <p>
6769
* Example to return reducer for reducing f_source = bucket(4, x) on f_target = bucket(2, x)
6870
* <ul>
@@ -77,8 +79,10 @@ public interface ReducibleFunction<I, O> {
7779
* @param otherNumBuckets number of buckets for the other bucket function
7880
* @return a reduction function if it is reducible, null if not
7981
*/
80-
default Reducer<I, O> reducer(ReducibleFunction<?, ?> otherFunction, int thisNumBuckets, int otherNumBuckets) {
81-
return reducer(otherFunction);
82+
default Reducer<I, O> reducer(ReducibleFunction<?, ?> otherFunction,
83+
int thisNumBuckets,
84+
int otherNumBuckets) {
85+
return reducer(otherFunction);
8286
}
8387

8488
/**
@@ -96,6 +100,6 @@ default Reducer<I, O> reducer(ReducibleFunction<?, ?> otherFunction, int thisNum
96100
* @return a reduction function if it is reducible, null if not.
97101
*/
98102
default Reducer<I, O> reducer(ReducibleFunction<?, ?> otherFunction) {
99-
return reducer(otherFunction, 0, 0);
103+
return reducer(otherFunction, 0, 0);
100104
}
101105
}

0 commit comments

Comments
 (0)