Skip to content

Commit 2d798a4

Browse files
Merge pull request #801 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/query-docs (branch main)
2 parents e4c38b9 + 70fc8b1 commit 2d798a4

4 files changed

Lines changed: 63 additions & 62 deletions

File tree

query-languages/m/m-spec-consolidated-grammar.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: M Language Consolidated Grammar
33
description: Describes all of the grammar associated with the Power Query M formula language
44
ms.topic: conceptual
5-
ms.date: 02/02/2024
5+
ms.date: 01/29/2025
66
ms.custom: "nonautomated-date"
77
ms.subservice: m-specification
88
---
@@ -260,15 +260,13 @@ logical-and-expression:<br/>
260260

261261
_is-expression:<br/>
262262
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as-expression<br/>
263-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is-expression_ `is` _nullable-primitive-type<br/>
264-
nullable-primitive-type:_<br/>
265-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_
263+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is-expression_ `is` _primitive-or-nullable-primitive-type_
266264

267265
#### As expression
268266

269267
_as-expression:<br/>
270268
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equality-expression<br/>
271-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as-expression_ `as` _nullable-primitive-type_
269+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as-expression_ `as` _primitive-or-nullable-primitive-type_
272270

273271
#### Equality expression
274272

@@ -448,15 +446,15 @@ fixed-parameter-list:<br/>
448446
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter<br/>
449447
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter_ `,` _fixed-parameter-list<br/>
450448
parameter:<br/>
451-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name primitive-parameter-type<sub>opt</sub><br/>
449+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name parameter-type<sub>opt</sub><br/>
452450
parameter-name:<br/>
453451
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;identifier<br/>
454-
primitive-parameter-type:<br/>
455-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-assertion<br/>
452+
parameter-type:<br/>
453+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-or-nullable-primitive-type-assertion<br/>
456454
return-type:<br/>
457-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-assertion<br/>
458-
primitive-assertion:_<br/>
459-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _nullable-primitive-type<br/>
455+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-or-nullable-primitive-type-assertion<br/>
456+
primitive-or-nullable-primitive-type-assertion:_<br/>
457+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _primitive-or-nullable-primitive-type<br/>
460458
optional-parameter-list:<br/>
461459
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter<br/>
462460
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter_ `,` _optional-parameter-list<br/>
@@ -502,15 +500,17 @@ type:<br/>
502500
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary-expression<br/>
503501
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary-type<br/>
504502
primary-type:<br/>
505-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-type<br/>
503+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-or-nullable-primitive-type<br/>
506504
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;record-type<br/>
507505
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list-type<br/>
508506
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function-type<br/>
509507
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table-type<br/>
510-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nullable-type<br/>
511-
primitive-type:_ one of<br/>
512-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`any anynonnull binary date datetime datetimezone duration function`<br/>
513-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`list logical none null number record table text time type`<br/>
508+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nullable-type_<br />
509+
_primitive-or-nullable-primitive-type:_<br/>
510+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_<br />
511+
_primitive-type:_ one of<br/>
512+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`any anynonnull binary date datetime datetimezone duration function list logical`<br/>
513+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`none null number record table text time type`<br/>
514514
_record-type:_<br/>
515515
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`[` _open-record-marker_ `]`<br/>
516516
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`[` _field-specification-list<sub>opt</sub>_ `]`<br/>
@@ -548,10 +548,10 @@ optional-parameter-specification-list:<br/>
548548
optional-parameter-specification:_<br/>
549549
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`optional` _parameter-specification<br/>
550550
parameter-specification:<br/>
551-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name parameter-type<br/>
551+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name parameter-type<br/>
552552
parameter-type:<br/>
553-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertion<br/>
554-
assertion:_<br/>
553+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type-assertion<br/>
554+
type-assertion:_<br/>
555555
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _type<br/>
556556
table-type:_<br/>
557557
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`table` _row-type<br/>

query-languages/m/m-spec-functions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A _function_ is a value that represents a mapping from a set of argument values
1717
Functions are written using a _function-expression_:
1818

1919
_function-expression:_<br/>
20-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`(` _parameter-list<sub>opt</sub>_ `)` _function-return-type<sub>opt</sub>_ `=>` _function-body<br/>
20+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`(` _parameter-list<sub>opt</sub>_ `)` _return-type<sub>opt</sub>_ `=>` _function-body<br/>
2121
function-body:<br/>
2222
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expression<br/>
2323
parameter-list:<br/>
@@ -26,24 +26,24 @@ parameter-list:<br/>
2626
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter-list<br/>
2727
fixed-parameter-list:<br/>
2828
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter<br/>
29-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter_ `,` _fixed-parameter-list<br/>
29+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter_ `,` _fixed-parameter-list<br/>
3030
parameter:<br/>
3131
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name parameter-type<sub>opt</sub><br/>
3232
parameter-name:<br/>
3333
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;identifier<br/>
3434
parameter-type:<br/>
35-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertion<br/>
36-
function-return-type:<br/>
37-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertion<br/>
38-
assertion:_<br/>
39-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _nullable-primiitve-type<br/>
35+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-or-nullable-primitive-type-assertion<br/>
36+
return-type:<br/>
37+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-or-nullable-primitive-type-assertion<br/>
38+
primitive-or-nullable-primitive-type-assertion:_<br/>
39+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _primitive-or-nullable-primitive-type<br/>
4040
optional-parameter-list:<br/>
4141
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter<br/>
4242
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter_ `,` _optional-parameter-list<br/>
4343
optional-parameter:_<br/>
44-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`optional` _parameter<br/>
45-
nullable-primitve-type<br/>
46-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> _primitive-type_
44+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`optional` _parameter_<br />
45+
_primitive-or-nullable-primitive-type:_<br/>
46+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_
4747

4848
The following is an example of a function that requires exactly two values `x` and `y`, and produces the result of applying the `+` operator to those values. The `x` and `y` are _parameters_ that are part of the _parameter-list_ of the function, and the `x + y` is the _function-body_:
4949

query-languages/m/m-spec-operators.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: M Language Operators
33
description: Describes using operators in the Power Query M formula language
44
ms.topic: conceptual
5-
ms.date: 12/12/2024
5+
ms.date: 2/13/2025
66
ms.custom: "nonautomated-date"
77
ms.subservice: m-specification
88
---
@@ -133,12 +133,12 @@ The following table summarizes the M operators, listing the operator categories
133133
<tr>
134134
<td>Type assertion</td>
135135
<td><em>x</em> <code>as</code> <em>y</em></td>
136-
<td>Is compatible nullable-primitive type or error</td>
136+
<td>Is compatible primitive/nullable primitive type or error</td>
137137
</tr>
138138
<tr>
139139
<td>Type conformance</td>
140140
<td><em>x</em> <code>is</code> <em>y</em></td>
141-
<td>Test if compatible nullable-primitive type</td>
141+
<td>Test if type is compatible with primitive type or nullable primitive type</td>
142142
</tr>
143143
<tr>
144144
<td>Logical AND</td>
@@ -1253,21 +1253,21 @@ The type compatibility operator `x is y` is defined for the following types of
12531253

12541254
| X | Y | Result |
12551255
| --- | --- | --- |
1256-
| `type any` | _nullable-primitive-type_ | `type logical` |
1256+
| `type any` | _primitive-or-nullable-primitive-type_ | `type logical` |
12571257

1258-
The expression `x is y` returns `true` if the ascribed type of `x` is compatible with `y`, and returns `false` if the ascribed type of `x` is incompatible with `y`. `y` must be a _nullable-primitivetype_.
1258+
The expression `x is y` returns `true` if the ascribed type of `x` is compatible with `y`, and returns `false` if it is not compatible. `y` must be a primitive type or a nullable primitive type.
12591259

12601260
_is-expression:<br/>
12611261
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as-expression<br/>
1262-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is-expression_ `is` _nullable-primitive-type<br/>
1263-
nullable-primitive-type:_<br/>
1264-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_
1262+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is-expression_ `is` _primitive-or-nullable-primitive-type<br />
1263+
primitive-or-nullable-primitive-type:_<br/>
1264+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_<br />
12651265

12661266
Type compatibility, as supported by the `is` operator, is a subset of [general type compatibility](m-spec-types.md) and is defined using the following rules:
12671267

1268-
* If `x` is null then it is compatible if `y` is the type `any`, the type `null`, or a nullable type.
1268+
* If `x` is null then it is compatible if `y` is the type `any`, the type `null`, or a nullable primitive type.
12691269

1270-
* If `x` is non-null then if it is a compatible if the the primitive type of `x` is the same as `y`.
1270+
* If `x` is non-null then it is compatible if the primitive type of `x` is the same as `y`.
12711271

12721272
The following holds when evaluating the expression `x is y`:
12731273

@@ -1279,13 +1279,15 @@ The type assertion operator `x as y` is defined for the following types of value
12791279

12801280
| X | Y | Result |
12811281
| --- | --- | --- |
1282-
| `type any` | _nullable-primitive-type_ | `type any` |
1282+
| `type any` | _primitive-or-nullable-primitive-type_ | `type any` |
12831283

1284-
The expression `x as y` asserts that the value `x` is compatible with `y` as per the `is` operator. If it is not compatible, an error is raised. `y` must be a _nullable-primitive-type_.
1284+
The expression `x as y` asserts that the value `x` is compatible with `y` as per the `is` operator. If it is not compatible, an error is raised. `y` must be a primitive type or a nullable primitive type.
12851285

12861286
_as-expression:<br/>
12871287
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equality-expression<br/>
1288-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as-expression_ `as` _nullable-primitive-type_
1288+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as-expression_ `as` _primitive-or-nullable-primitive-type<br />
1289+
primitive-or-nullable-primitive-type:_<br/>
1290+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_
12891291

12901292
The expression `x as y` is evaluated as follows:
12911293

query-languages/m/m-spec-types.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: M Language types
33
description: Describes using types in the Power Query M formula language
44
ms.topic: conceptual
5-
ms.date: 10/7/2024
5+
ms.date: 1/29/2025
66
ms.custom: "nonautomated-date"
77
ms.subservice: m-specification
88
---
@@ -32,19 +32,18 @@ All types that are not members of the closed set of primitive types plus their n
3232
_type-expression:<br/>
3333
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary-expression_<br/>
3434
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`type` _primary-type<br/>
35-
type:<br/>
36-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary-expression<br/>
37-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary-type<br/>
3835
primary-type:<br/>
39-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-type<br/>
36+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primitive-or-nullable-primitive-type<br/>
4037
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;record-type<br/>
4138
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list-type<br/>
4239
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function-type<br/>
4340
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table-type<br/>
44-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nullable-type<br/>
45-
primitive-type:_ one of<br/>
41+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nullable-type_<br />
42+
_primitive-or-nullable-primitive-type:_<br/>
43+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`nullable`_<sub>opt</sub> primitive-type_<br />
44+
_primitive-type:_ one of<br/>
4645
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`any anynonnull binary date datetime datetimezone duration function list logical`<br/>
47-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`none null number record table text time type`
46+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`none null number record table text time type`<br/>
4847

4948
The _primitive-type_ names are _contextual keywords_ recognized only in a _type_ context. The use of parentheses in a _type_ context moves the grammar back to a regular expression context, requiring the use of the type keyword to move back into a type context. For example, to invoke a function in a _type_ context, parentheses can be used:
5049

@@ -95,7 +94,7 @@ Value.Type( 1 as number ) // type number
9594
{2} as text // error, type mismatch
9695
```
9796

98-
Note that the `is` and `as` operators only accept nullable primitive types as their right operand. M does not provide means to check values for conformance to custom types.
97+
Note that the `is` and `as` operators only accept a _primitive or nullable primitive type_ (i.e. a _non-custom type_) as their right operand. M does not provide means to check values for conformance to custom types.
9998

10099
A type `X` is _compatible_ with a type `Y` if and only if all values that conform to `X` also conform to `Y`. All types are compatible with type `any` and no types (but `none` itself) are compatible with type `none`. The following graph shows the compatibility relation. (Type compatibility is reflexive and transitive. It forms a lattice with type `any` as the top and type `none` as the bottom value.) The names of abstract types are set in _italics_.
101100

@@ -210,28 +209,28 @@ A conforming value may contain field names not listed in the field specification
210209

211210
Any function value conforms to the primitive type `function`, which does not place any restrictions on the types of the function's formal parameters or the function's return value. A custom _function-type value_ is used to place type restrictions on the signatures of conformant function values.
212211

213-
_function-type:_<br/>
214-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`function (` _parameter-specification-list<sub>opt</sub>_ `)` _function-return-type<br/>
212+
function-type:_<br/>
213+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`function (` _parameter-specification-list<sub>opt</sub>_ `)` _return-type<br/>
215214
parameter-specification-list:<br/>
216215
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required-parameter-specification-list<br/>
217216
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required-parameter-specification-list_ `,` _optional-parameter-specification-list<br/>
218217
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter-specification-list<br/>
219218
required-parameter-specification-list:<br/>
220219
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required-parameter-specification<br/>
221-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required-parameter-specification_ `,` _required-parameter-specification-list<br/>
220+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required-parameter-specification_ `,` _required-parameter-specification-list<br/>
222221
required-parameter-specification:<br/>
223222
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-specification<br/>
224223
optional-parameter-specification-list:<br/>
225224
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter-specification<br/>
226-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter-specification_ `,` _optional-parameter-specification-list<br/>
225+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional-parameter-specification_ `,` _optional-parameter-specification-list<br/>
227226
optional-parameter-specification:_<br/>
228-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`optional` _parameter-specification<br/>
227+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`optional` _parameter-specification<br/>
229228
parameter-specification:<br/>
230-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name parameter-type<br/>
231-
function-return-type:<br/>
232-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertion<br/>
233-
assertion:_<br/>
234-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _nullable-primitive-type_
229+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameter-name parameter-type<br/>
230+
parameter-type:<br/>
231+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type-assertion<br/>
232+
type-assertion:_<br/>
233+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`as` _type_
235234

236235
The result of evaluating a _function-type_ is a type value whose base type is `function`.
237236

@@ -364,7 +363,7 @@ Value.Type( Value.ReplaceType( {1}, type {number} )
364363

365364
Type equivalence is not defined in M. An M implementation may optionally choose to use its own rules to perform equality comparisons between type values. Comparing two type values for equality should evaluate to `true` if they are considered identical by the implementation, and `false` otherwise. In either case, the response returned must be consistent if the same two values are repeatedly compared. Note that within a given implementation, comparing some identical type values (such as `(type text) = (type text)`) may return `true`, while comparing others (such as `(type [a = text]) = (type [a = text])`) may not.
366365

367-
Compatibility between a given type and a nullable primitive type can be determined using the library function `Type.Is`, which accepts an arbitrary type value as its first and a nullable primitive type value as its second argument:
366+
Compatibility between a given type and either a primitive type or a nullable primitive type can be determined using the library function `Type.Is`, which accepts an arbitrary type value as its first argument and a primitive or nullable primitive type value as its second argument:
368367

369368
```powerquery-m
370369
Type.Is(type text, type nullable text) // true

0 commit comments

Comments
 (0)