Skip to content

Commit fafadbc

Browse files
PPL to Console (#8638)
* Pipelines for Console Evaluation
1 parent e3e2078 commit fafadbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+15241
-349
lines changed

common/api-review/firestore-lite.api.md

Lines changed: 1737 additions & 39 deletions
Large diffs are not rendered by default.

common/api-review/firestore.api.md

Lines changed: 1704 additions & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
"postinstall-postinstall": "2.1.0",
144144
"prettier": "2.8.7",
145145
"protractor": "5.4.2",
146+
"protobufjs-cli": "^1.1.3",
146147
"request": "2.88.2",
147148
"semver": "7.5.3",
148149
"simple-git": "3.24.0",

packages/firestore/lite/index.ts

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,171 @@
2727
import { registerFirestore } from './register';
2828
registerFirestore();
2929

30+
export { PipelineSource } from '../src/lite-api/pipeline-source';
31+
32+
export { PipelineResult } from '../src/lite-api/pipeline-result';
33+
34+
export { Pipeline, pipeline } from '../src/lite-api/pipeline';
35+
36+
export { useFirestorePipelines } from '../src/lite-api/database_augmentation';
37+
38+
export { execute } from '../src/lite-api/pipeline_impl';
39+
40+
export {
41+
Stage,
42+
FindNearestOptions,
43+
AddFields,
44+
Aggregate,
45+
Distinct,
46+
CollectionSource,
47+
CollectionGroupSource,
48+
DatabaseSource,
49+
DocumentsSource,
50+
Where,
51+
FindNearest,
52+
Limit,
53+
Offset,
54+
Select,
55+
Sort,
56+
GenericStage
57+
} from '../src/lite-api/stage';
58+
59+
export {
60+
add,
61+
subtract,
62+
multiply,
63+
divide,
64+
mod,
65+
eq,
66+
neq,
67+
lt,
68+
lte,
69+
gt,
70+
gte,
71+
arrayConcat,
72+
arrayContains,
73+
arrayContainsAny,
74+
arrayContainsAll,
75+
arrayLength,
76+
inAny,
77+
notInAny,
78+
xor,
79+
ifFunction,
80+
not,
81+
logicalMax,
82+
logicalMin,
83+
exists,
84+
isNan,
85+
reverse,
86+
replaceFirst,
87+
replaceAll,
88+
byteLength,
89+
charLength,
90+
like,
91+
regexContains,
92+
regexMatch,
93+
strContains,
94+
startsWith,
95+
endsWith,
96+
toLower,
97+
toUpper,
98+
trim,
99+
strConcat,
100+
mapGet,
101+
countAll,
102+
min,
103+
max,
104+
cosineDistance,
105+
dotProduct,
106+
euclideanDistance,
107+
vectorLength,
108+
unixMicrosToTimestamp,
109+
timestampToUnixMicros,
110+
unixMillisToTimestamp,
111+
timestampToUnixMillis,
112+
unixSecondsToTimestamp,
113+
timestampToUnixSeconds,
114+
timestampAdd,
115+
timestampSub,
116+
genericFunction,
117+
ascending,
118+
descending,
119+
ExprWithAlias,
120+
Field,
121+
Fields,
122+
Constant,
123+
FirestoreFunction,
124+
Add,
125+
Subtract,
126+
Multiply,
127+
Divide,
128+
Mod,
129+
Eq,
130+
Neq,
131+
Lt,
132+
Lte,
133+
Gt,
134+
Gte,
135+
ArrayConcat,
136+
ArrayReverse,
137+
ArrayContains,
138+
ArrayContainsAll,
139+
ArrayContainsAny,
140+
ArrayLength,
141+
ArrayElement,
142+
In,
143+
IsNan,
144+
Exists,
145+
Not,
146+
And,
147+
Or,
148+
Xor,
149+
If,
150+
LogicalMax,
151+
LogicalMin,
152+
Reverse,
153+
ReplaceFirst,
154+
ReplaceAll,
155+
CharLength,
156+
ByteLength,
157+
Like,
158+
RegexContains,
159+
RegexMatch,
160+
StrContains,
161+
StartsWith,
162+
EndsWith,
163+
ToLower,
164+
ToUpper,
165+
Trim,
166+
StrConcat,
167+
MapGet,
168+
Count,
169+
Sum,
170+
Avg,
171+
Min,
172+
Max,
173+
CosineDistance,
174+
DotProduct,
175+
EuclideanDistance,
176+
VectorLength,
177+
UnixMicrosToTimestamp,
178+
TimestampToUnixMicros,
179+
UnixMillisToTimestamp,
180+
TimestampToUnixMillis,
181+
UnixSecondsToTimestamp,
182+
TimestampToUnixSeconds,
183+
TimestampAdd,
184+
TimestampSub,
185+
Ordering,
186+
ExprType,
187+
AccumulatorTarget,
188+
FilterExpr,
189+
SelectableExpr,
190+
Selectable,
191+
FilterCondition,
192+
Accumulator
193+
} from '../src/lite-api/expressions';
194+
30195
export {
31196
aggregateQuerySnapshotEqual,
32197
getCount,

packages/firestore/src/api.ts

Lines changed: 172 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,176 @@
1515
* limitations under the License.
1616
*/
1717

18+
export { PipelineSource } from './lite-api/pipeline-source';
19+
20+
export { PipelineResult } from './lite-api/pipeline-result';
21+
22+
export { Pipeline, pipeline } from './api/pipeline';
23+
24+
export { useFirestorePipelines } from './api/database_augmentation';
25+
26+
export { execute } from './lite-api/pipeline_impl';
27+
28+
export {
29+
Stage,
30+
FindNearestOptions,
31+
AddFields,
32+
Aggregate,
33+
Distinct,
34+
CollectionSource,
35+
CollectionGroupSource,
36+
DatabaseSource,
37+
DocumentsSource,
38+
Where,
39+
FindNearest,
40+
Limit,
41+
Offset,
42+
Select,
43+
Sort,
44+
GenericStage
45+
} from './lite-api/stage';
46+
47+
export {
48+
add,
49+
subtract,
50+
multiply,
51+
divide,
52+
mod,
53+
eq,
54+
neq,
55+
lt,
56+
lte,
57+
gt,
58+
gte,
59+
arrayConcat,
60+
arrayContains,
61+
arrayContainsAny,
62+
arrayContainsAll,
63+
arrayLength,
64+
inAny,
65+
notInAny,
66+
xor,
67+
ifFunction,
68+
not,
69+
logicalMax,
70+
logicalMin,
71+
exists,
72+
isNan,
73+
reverse,
74+
replaceFirst,
75+
replaceAll,
76+
byteLength,
77+
charLength,
78+
like,
79+
regexContains,
80+
regexMatch,
81+
strContains,
82+
startsWith,
83+
endsWith,
84+
toLower,
85+
toUpper,
86+
trim,
87+
strConcat,
88+
mapGet,
89+
countAll,
90+
countFunction,
91+
sumFunction,
92+
avgFunction,
93+
andFunction,
94+
orFunction,
95+
min,
96+
max,
97+
cosineDistance,
98+
dotProduct,
99+
euclideanDistance,
100+
vectorLength,
101+
unixMicrosToTimestamp,
102+
timestampToUnixMicros,
103+
unixMillisToTimestamp,
104+
timestampToUnixMillis,
105+
unixSecondsToTimestamp,
106+
timestampToUnixSeconds,
107+
timestampAdd,
108+
timestampSub,
109+
genericFunction,
110+
ascending,
111+
descending,
112+
ExprWithAlias,
113+
Field,
114+
Fields,
115+
Constant,
116+
FirestoreFunction,
117+
Add,
118+
Subtract,
119+
Multiply,
120+
Divide,
121+
Mod,
122+
Eq,
123+
Neq,
124+
Lt,
125+
Lte,
126+
Gt,
127+
Gte,
128+
ArrayConcat,
129+
ArrayReverse,
130+
ArrayContains,
131+
ArrayContainsAll,
132+
ArrayContainsAny,
133+
ArrayLength,
134+
ArrayElement,
135+
In,
136+
IsNan,
137+
Exists,
138+
Not,
139+
And,
140+
Or,
141+
Xor,
142+
If,
143+
LogicalMax,
144+
LogicalMin,
145+
Reverse,
146+
ReplaceFirst,
147+
ReplaceAll,
148+
CharLength,
149+
ByteLength,
150+
Like,
151+
RegexContains,
152+
RegexMatch,
153+
StrContains,
154+
StartsWith,
155+
EndsWith,
156+
ToLower,
157+
ToUpper,
158+
Trim,
159+
StrConcat,
160+
MapGet,
161+
Count,
162+
Sum,
163+
Avg,
164+
Min,
165+
Max,
166+
CosineDistance,
167+
DotProduct,
168+
EuclideanDistance,
169+
VectorLength,
170+
UnixMicrosToTimestamp,
171+
TimestampToUnixMicros,
172+
UnixMillisToTimestamp,
173+
TimestampToUnixMillis,
174+
UnixSecondsToTimestamp,
175+
TimestampToUnixSeconds,
176+
TimestampAdd,
177+
TimestampSub,
178+
Ordering,
179+
ExprType,
180+
AccumulatorTarget,
181+
FilterExpr,
182+
SelectableExpr,
183+
Selectable,
184+
FilterCondition,
185+
Accumulator
186+
} from './lite-api/expressions';
187+
18188
export {
19189
aggregateFieldEqual,
20190
aggregateQuerySnapshotEqual,
@@ -224,7 +394,8 @@ export { isBase64Available as _isBase64Available } from './platform/base64';
224394
export { DatabaseId as _DatabaseId } from './core/database_info';
225395
export {
226396
_internalQueryToProtoQueryTarget,
227-
_internalAggregationQueryToProtoRunAggregationQueryRequest
397+
_internalAggregationQueryToProtoRunAggregationQueryRequest,
398+
_internalPipelineToExecutePipelineRequestProto
228399
} from './remote/internal_serializer';
229400
export {
230401
cast as _cast,

packages/firestore/src/api/aggregate.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,21 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { AggregateField, AggregateSpec, DocumentData, Query } from '../api';
1918
import { AggregateImpl } from '../core/aggregate';
2019
import { firestoreClientRunAggregateQuery } from '../core/firestore_client';
2120
import { count } from '../lite-api/aggregate';
22-
import { AggregateQuerySnapshot } from '../lite-api/aggregate_types';
21+
import {
22+
AggregateField,
23+
AggregateQuerySnapshot,
24+
AggregateSpec
25+
} from '../lite-api/aggregate_types';
26+
import { DocumentData, Query } from '../lite-api/reference';
2327
import { ApiClientObjectMap, Value } from '../protos/firestore_proto_api';
2428
import { cast } from '../util/input_validation';
2529
import { mapToArray } from '../util/obj';
2630

2731
import { ensureFirestoreConfigured, Firestore } from './database';
28-
import { ExpUserDataWriter } from './reference_impl';
32+
import { ExpUserDataWriter } from './user_data_writer';
2933

3034
export {
3135
aggregateQuerySnapshotEqual,

0 commit comments

Comments
 (0)