Share via


Built-In U-SQL Types

Summary

Any C# type can be used in U-SQL (and C#) expressions, but only a limited subset of them can be used as column types in a rowset. These types are called built-in U-SQL types.

Only these built-in U-SQL types can be specified in a schema definition of an EXTRACT or OUTPUT statement, in a CREATE TABLE schema, as a parameter in a table-valued function, in a table type, in a PRODUCES clause of a UDO invocation, or can be passed between query statement boundaries.

Built-in U-SQL types can be composed into table types that can be used to define table parameters.

The built-in U-SQL types can be classified into the following types: simple built-in types and complex built-in types. We use the following grammar to refer to these types.

Syntax

Built_in_Type :=                                                                                         
    Simple_Type | Complex_Type.

Their semantics in general follows their C# semantics with a few notable exceptions called out below.

U-SQL Type Nullability

Note that unlike SQL data types, where a type is nullable unless specified otherwise, U-SQL types follow the C# rule that non-object types are not nullable per default and have to explicitly be marked as nullable with a question mark ?, while object types are implicitly nullable and can neither be marked as nullable nor marked as not nullable.

See Also