microsoft / microsoft/vscode-powerquery-sdk

Output Format Suggestion - Scalar Values

Open
#151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
92
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Preflight Checklist
Problem

Scalar values are output as single-column tables.

Desired Solution

Output scalar values as true JSON scalar values.

Alternatives and Workarounds

No response

Additional Context

Currently, PQTest.exe run-test outputs scalar values as though they were a single row table.

`// expression = 123
"Output": [
    {
        "Value": 123
    }
],
"RowCount": 1

The above output is indistinguishable from a true single-row table with a column named "Value".

// expression: Table.FromValue(123)
"Output": [
    {
        "Value": 123
    }
],
"RowCount": 1

To differentiate between the two, could scalar values be output as JSON scalar values? For example, ouput the M expression 123 as "Output": 123 instead of what the above examples show.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the PQTest.exe run-test entry point and trace how scalar expressions and tables are serialized. Verify the behavior using the issue's examples: a scalar such as 123 should produce JSON 123, while Table.FromValue(123) should remain a single-row table with RowCount 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.