Skip to content

Preserve literal rows in defined table types - #411

Merged
Alex Vallone (amv146) merged 6 commits into
masterfrom
alexvallone/table-literal-inference-0.18.5
Aug 21, 2026
Merged

Preserve literal rows in defined table types#411
Alex Vallone (amv146) merged 6 commits into
masterfrom
alexvallone/table-literal-inference-0.18.5

Conversation

@amv146

@amv146 Alex Vallone (amv146) commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add optional exact rows to DefinedTable
  • allow TypeUtils.definedTable to receive retained rows
  • compare retained rows in order when checking defined-table equality
  • distinguish exact empty rows from unknown rows

Related stack

Validation

  • npm run build
  • targeted ESLint on changed implementation and test files
  • npm test (680 passing, 1 pending)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9839e176-efce-4a70-811b-7e2668cdb7f3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9839e176-efce-4a70-811b-7e2668cdb7f3
FieldSpecificationList<OrderedFields> & {
readonly kind: TypeKind.Table;
readonly extendedKind: ExtendedTypeKind.DefinedTable;
readonly rows?: ReadonlyArray<DefinedRecord>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. make it not optional
  2. simplify to ReadonlyArray<UnorderedFields>

Comment thread src/powerquery-parser/language/type/typeUtils/factories.ts
Alex Vallone and others added 3 commits August 19, 2026 15:41
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 946bd35e-0c84-49f0-90ff-a15d522d34f8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 946bd35e-0c84-49f0-90ff-a15d522d34f8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 946bd35e-0c84-49f0-90ff-a15d522d34f8
@amv146
Alex Vallone (amv146) merged commit baef833 into master Aug 21, 2026
5 checks passed
@amv146
Alex Vallone (amv146) deleted the alexvallone/table-literal-inference-0.18.5 branch August 21, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants