Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/ecr-login-lock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@platforma-sdk/block-tools": patch
---

Fix concurrent `docker login` race during parallel software builds: serialize the ECR login
across processes with a cross-process file lock, avoiding the macOS keychain -25299 error.
9 changes: 9 additions & 0 deletions .changeset/three-pants-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@milaboratories/pl-model-common": patch
"@milaboratories/pf-spec-driver": patch
"@milaboratories/pf-driver": patch
"@platforma-sdk/model": patch
---

PFrames update: add Limit query node. createPlDataTableV3 caps results at 50k
rows when the runtime supports the pFrameQueryLimitSupport feature flag.
23 changes: 23 additions & 0 deletions lib/model/common/src/drivers/pframe/query/query_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,29 @@ export interface QueryFilter<Q, E> {
predicate: E;
}

/**
* Limit query operation.
*
* Keeps only the first `fetch` records.
*
* **Behavior**:
* - All axes and columns pass through unchanged; only record count changes
* - Order is determined by the pending sort of the input (or axis order by default)
*
* @template Q - Input query type
*
* @example
* // Keep the first 100 records
* { type: 'limit', input: dataQuery, fetch: 100 }
*/
export interface QueryLimit<Q> {
type: "limit";
/** Input query to limit */
input: Q;
/** Maximum number of records to keep */
fetch: number;
}

/**
* Column reference query (leaf node).
*
Expand Down
4 changes: 4 additions & 0 deletions lib/model/common/src/drivers/pframe/query/query_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import type {
QueryFilter,
QueryInlineColumn,
QueryJoinEntry,
QueryLimit,
QueryLinkerJoin,
QueryOuterJoin,
QuerySliceAxes,
Expand Down Expand Up @@ -101,6 +102,8 @@ export type DataQuerySliceAxes = QuerySliceAxes<DataQuery, number>;
export type DataQuerySort = QuerySort<DataQuery, DataQueryExpression>;
/** @see QueryFilter */
export type DataQueryFilter = QueryFilter<DataQuery, DataQueryBooleanExpression>;
/** @see QueryLimit */
export type DataQueryLimit = QueryLimit<DataQuery>;
/** @see QueryTransformColumns */
export type DataQueryTransformColumns = QueryTransformColumns<
DataQuery,
Expand Down Expand Up @@ -129,6 +132,7 @@ export type DataQuery =
| DataQuerySliceAxes
| DataQuerySort
| DataQueryFilter
| DataQueryLimit
| DataQueryTransformColumns;

/** @see ExprAxisRef */
Expand Down
4 changes: 4 additions & 0 deletions lib/model/common/src/drivers/pframe/query/query_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
QueryFilter,
QueryInlineColumn,
QueryJoinEntry,
QueryLimit,
QueryLinkerJoin,
QueryOuterJoin,
QuerySliceAxes,
Expand Down Expand Up @@ -88,6 +89,8 @@ export type SpecQueryFilter<C = ColumnUniversalId> = QueryFilter<
SpecQuery<C>,
SpecQueryBooleanExpression
>;
/** @see QueryLimit */
export type SpecQueryLimit<C = ColumnUniversalId> = QueryLimit<SpecQuery<C>>;
/** @see QueryTransformColumns */
export type SpecQueryTransformColumns<C = ColumnUniversalId> = QueryTransformColumns<
SpecQuery<C>,
Expand Down Expand Up @@ -131,6 +134,7 @@ export type SpecQuery<C = ColumnUniversalId> =
| SpecQuerySliceAxes<C>
| SpecQuerySort<C>
| SpecQueryFilter<C>
| SpecQueryLimit<C>
| SpecQueryTransformColumns<C>
| SpecQuerySpecOverride<C>;

Expand Down
7 changes: 7 additions & 0 deletions lib/model/common/src/drivers/pframe/query/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function traverseQuerySpec<C1, C2>(
}
case "filter":
case "sort":
case "limit":
case "sliceAxes":
case "transformColumns":
case "specOverride":
Expand Down Expand Up @@ -259,6 +260,12 @@ function cmpQuerySpec(lhs: SpecQuery, rhs: SpecQuery): number {
return cmpQuerySpec(lhs.input, (rhs as typeof lhs).input);
case "filter":
return cmpQuerySpec(lhs.input, (rhs as typeof lhs).input);
case "limit": {
const rhsLimit = rhs as typeof lhs;
const cmp = cmpQuerySpec(lhs.input, rhsLimit.input);
if (cmp !== 0) return cmp;
return lhs.fetch - rhsLimit.fetch;
}
case "specOverride": {
const rhsSo = rhs as typeof lhs;
const cmp = cmpQuerySpec(lhs.input, rhsSo.input);
Expand Down
Loading
Loading