Skip to content

Commit f775b29

Browse files
committed
Sync with private preview catelog
1 parent de7a147 commit f775b29

32 files changed

+2814
-254
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.firestore.pipeline.expressions;
18+
19+
import com.google.api.core.BetaApi;
20+
import com.google.api.core.InternalApi;
21+
import com.google.common.collect.ImmutableList;
22+
23+
@BetaApi
24+
public final class ArrayReverse extends Function {
25+
@InternalApi
26+
ArrayReverse(Expr array) {
27+
super("array_reverse", ImmutableList.of(array));
28+
}
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.firestore.pipeline.expressions;
18+
19+
import com.google.api.core.BetaApi;
20+
import com.google.api.core.InternalApi;
21+
import com.google.common.collect.ImmutableList;
22+
23+
@BetaApi
24+
public final class BitAnd extends Function {
25+
@InternalApi
26+
BitAnd(Expr left, Expr right) {
27+
super("bit_and", ImmutableList.of(left, right));
28+
}
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.firestore.pipeline.expressions;
18+
19+
import com.google.api.core.BetaApi;
20+
import com.google.api.core.InternalApi;
21+
import com.google.common.collect.ImmutableList;
22+
23+
@BetaApi
24+
public final class BitLeftShift extends Function {
25+
@InternalApi
26+
BitLeftShift(Expr left, Expr right) {
27+
super("bit_left_shift", ImmutableList.of(left, right));
28+
}
29+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import com.google.common.collect.ImmutableList;
2222

2323
@BetaApi
24-
public final class StrLength extends Function {
24+
public final class BitNot extends Function {
2525
@InternalApi
26-
StrLength(Expr expr) {
27-
super("length", ImmutableList.of(expr));
26+
BitNot(Expr value) {
27+
super("bit_not", ImmutableList.of(value));
2828
}
2929
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.firestore.pipeline.expressions;
18+
19+
import com.google.api.core.BetaApi;
20+
import com.google.api.core.InternalApi;
21+
import com.google.common.collect.ImmutableList;
22+
23+
@BetaApi
24+
public final class BitOr extends Function {
25+
@InternalApi
26+
BitOr(Expr left, Expr right) {
27+
super("bit_or", ImmutableList.of(left, right));
28+
}
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.firestore.pipeline.expressions;
18+
19+
import com.google.api.core.BetaApi;
20+
import com.google.api.core.InternalApi;
21+
import com.google.common.collect.ImmutableList;
22+
23+
@BetaApi
24+
public final class BitRightShift extends Function {
25+
@InternalApi
26+
BitRightShift(Expr left, Expr right) {
27+
super("bit_right_shift", ImmutableList.of(left, right));
28+
}
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.firestore.pipeline.expressions;
18+
19+
import com.google.api.core.BetaApi;
20+
import com.google.api.core.InternalApi;
21+
import com.google.common.collect.ImmutableList;
22+
23+
@BetaApi
24+
public final class BitXor extends Function {
25+
@InternalApi
26+
BitXor(Expr left, Expr right) {
27+
super("bit_xor", ImmutableList.of(left, right));
28+
}
29+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import com.google.common.collect.ImmutableList;
2222

2323
@BetaApi
24-
public final class ToLowercase extends Function {
24+
public final class ByteLength extends Function {
2525
@InternalApi
26-
ToLowercase(Expr expr) {
27-
super("to_lowercase", ImmutableList.of(expr));
26+
ByteLength(Expr expr) {
27+
super("byte_length", ImmutableList.of(expr));
2828
}
2929
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import com.google.common.collect.ImmutableList;
2222

2323
@BetaApi
24-
public final class ToUppercase extends Function {
24+
public final class CharLength extends Function {
2525
@InternalApi
26-
ToUppercase(Expr expr) {
27-
super("to_uppercase", ImmutableList.of(expr));
26+
CharLength(Expr expr) {
27+
super("char_length", ImmutableList.of(expr));
2828
}
2929
}

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Count.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
import com.google.api.core.BetaApi;
2020
import com.google.api.core.InternalApi;
2121
import com.google.common.collect.ImmutableList;
22+
import javax.annotation.Nonnull;
2223

2324
@BetaApi
2425
public final class Count extends Function implements Accumulator {
2526
@InternalApi
26-
Count(Expr value) {
27-
super("count", (value != null) ? ImmutableList.of(value) : ImmutableList.of());
27+
Count(@Nonnull Expr value) {
28+
super("count", ImmutableList.of(value));
2829
}
2930
}

0 commit comments

Comments
 (0)