Merged
Conversation
Replaces `Collection<text>` for interpreting tables.
1ddd369 to
a742cf3
Compare
georg-schwarz
approved these changes
Feb 20, 2026
Member
georg-schwarz
left a comment
There was a problem hiding this comment.
Awesome! I'll trigger copilt but good to go from my side!
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements RFC 0021, which introduces a new SheetRow type and dot operator (.) syntax for accessing sheet row cells, replacing the previous Collection<text> type and cellInColumn operator. This change simplifies the syntax for row transformations in tabular data processing.
Changes:
- Introduced new
SheetRowprimitive value type for representing sheet rows - Replaced
cellInColumnoperator with.operator for cell access (e.g.,r . "column"orr . 0) - Updated all transform definitions across examples, standard library, and test files to use the new syntax
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
libs/language-server/src/lib/ast/wrappers/value-type/primitive/sheetrow-value-type.ts |
New SheetRow value type implementation |
libs/language-server/src/lib/ast/wrappers/value-type/primitive/primitive-value-type-provider.ts |
Added SheetRow to primitive type provider |
libs/language-server/src/lib/ast/wrappers/value-type/primitive/index.ts |
Exported SheetRow type |
libs/language-server/src/lib/ast/wrappers/value-type/value-type.ts |
Added visitSheetRow method to visitor interface |
libs/language-server/src/lib/ast/expressions/evaluators/dot-operator-evaluator.ts |
Renamed from CellInColumnOperatorEvaluator to DotOperatorEvaluator |
libs/language-server/src/lib/ast/expressions/type-computers/dot-operator-type-computer.ts |
Renamed from CellInColumnOperatorTypeComputer to DotOperatorTypeComputer |
libs/language-server/src/lib/ast/expressions/operator-registry.ts |
Updated operator registry to use . instead of cellInColumn |
libs/language-server/src/grammar/expression.langium |
Changed grammar to use . operator |
libs/language-server/src/lib/validation/checks/transform-body.ts |
Updated error message (but validation logic needs fix) |
libs/language-server/src/lib/ast/wrappers/value-type/primitive/collection/abstract-collection-value-type.ts |
Removed isReferenceableByUser() override (Collections now non-referenceable by users) |
libs/execution/src/lib/types/value-types/visitors/*.ts |
Added visitSheetRow implementations to all value type visitors |
libs/execution/src/lib/transforms/transform-executor.ts |
Minor refactoring using onlyElementOrUndefined |
Multiple .jv example and test files |
Updated all transform definitions to use SheetRow and . operator |
Comments suppressed due to low confidence (1)
libs/language-server/src/lib/validation/checks/transform-body.ts:166
- The validation logic still checks for
Collection<text>type (line 157) but the error message saysSheetRow(line 160). The condition should be updated to check forSheetRowinstead:
Change line 136-138 from:
const textCollection = props.valueTypeProvider.createCollectionValueTypeOf(
props.valueTypeProvider.Primitives.Text,
);
to:
const sheetRow = props.valueTypeProvider.Primitives.SheetRow;
And change line 157 from:
if (!inputValueType.equals(textCollection)) {
to:
if (!inputValueType.equals(sheetRow)) {
const textCollection = props.valueTypeProvider.createCollectionValueTypeOf(
props.valueTypeProvider.Primitives.Text,
);
const input = onlyElementOrUndefined(inputs);
const inputValueType = props.wrapperFactories.ValueType.wrap(
input?.valueType,
);
assert(input !== undefined);
if (inputValueType === undefined) {
props.validationContext.accept(
'error',
'Transforms with a table row expression must have exactly one input',
{
node: transformBody,
},
);
return;
}
if (!inputValueType.equals(textCollection)) {
props.validationContext.accept(
'error',
'This input must be of type `SheetRow',
{
node: input.valueType,
},
);
return;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libs/language-server/src/lib/validation/checks/transform-body.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot
Co-authored-by: Copilot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements RFC 0021 (#689)