Results of 1 - 10 of about 16 for notation (0.002 sec.)
- Struct Data Type 13239
- Conceptually, a STRUCT column contains an ordered list of columns called “entries”. The entries are referenced by name using strings. This document refers to those entry names as keys. Each row in the STRUCT column must have the same keys.
...ts with unnamed entries are represented by the TUPLE type , which can be created using the row function or the (expr, ...) notation. See an example below and the STRUCT functions documentation for details. See the data types overview for a comparison bet...ata types. Creating Structs Structs can be created using the struct_pack(name := expr, ...) function, the equivalent array notation {'name': expr, ...} , or using a row variable. To create a struct with unnamed entries, use a tuple . Create a struct usin...eys and the use of the := operator: SELECT struct_pack(key1 := 'value1', key2 := 42) AS s; Create a struct using the array notation: SELECT {'key1': 'value1', 'key2': 42} AS s; Create a struct using a row variable: SELECT d AS s FROM (SELECT 'value1' AS... - https://man.mtool.work/duckdb/2.0/sql/data_types/struct.html
- Literal Types 11800
- DuckDB has special literal types for representing NULL , integer and string literals in queries. These have their own binding and conversion rules. Prior to DuckDB version 0.10.0, integer and string literals behaved identically to the INTEG
...kDB does not support hexadecimal or binary literals directly. However, strings or string literals in hexadecimal or binary notation with 0x or 0b prefixes respectively, can be cast to integer types, e.g., '0xFF'::INT = 255 or '0b101'::INT = 5 . Other Num...eric Literals Non-integer numeric literals can be denoted with decimal notation, using the period character ( . ) to separate the integer part and the decimal part of the number. Either the integer part...omitted: SELECT 1.5; -- 1.5 SELECT .50; -- 0.5 SELECT 2.; -- 2.0 Non-integer numeric literals can also be denoted using E notation . In E notation, an integer or decimal literal is followed by an exponential part, which is denoted by e or E , followed b... - https://man.mtool.work/duckdb/2.0/sql/data_types/literal_types.html
- Struct Functions 10778
- The functions on this page work on STRUCT values . Functions that access entries by position, such as struct[idx] , struct_extract_at , struct_contains , struct_position and struct_values , also accept TUPLE values , i.e., structs with unna
...i.e., struct_insert , struct_keys , struct_update and remap_struct , require a STRUCT . Name Description struct.entry Dot notation that serves as an alias for struct_extract from named STRUCT s. struct[entry] Bracket notation that serves as an alias for...struct_extract from named STRUCT s. struct[idx] Bracket notation that serves as an alias for struct_extract from TUPLE s, using an index (1-based). remap_struct(input, target_type, mappin...of an existing STRUCT . struct_values(struct) Return the values of a STRUCT as a TUPLE . struct.entry | Description | Dot notation that serves as an alias for struct_extract from named STRUCT s. | | Example | ({'i': 3, 's': 'string'}).i | | Result | 3 |... - https://man.mtool.work/duckdb/2.0/sql/functions/struct.html
- Union Functions 9530
- Name Description union.tag Dot notation serves as an alias for union_extract . union_extract(union, 'tag') Extract the value with the named tags from the union. NULL if the tag is not currently selected. union_value(tag := any) Create a sin
...ariable name. union_tag(union) Retrieve the currently selected tag of the union as an Enum . union.tag | Description | Dot notation serves as an alias for union_extract . | | Example | (union_value(k := 'hello')).k | | Result | hello | union_extract(unio... - https://man.mtool.work/duckdb/2.0/sql/functions/union.html
- Array Type 8716
- An ARRAY column stores fixed-sized arrays. All fields in the column must have the same length and the same underlying type. Arrays are typically used to store arrays of numbers, but can contain any uniform data type, including ARRAY , LIST
...; Retrieving Values from Arrays Retrieving one or more values from an array can be accomplished using brackets and slicing notation, or through list functions like list_extract and array_extract . Using the example in Defining an Array Field . The follow...ent FROM array_table; SELECT id, array_extract(arr, 1) AS element FROM array_table; id element 10 1 20 4 Using the slicing notation returns a LIST : SELECT id, arr[1:2] AS elements FROM array_table; id elements 10 [1, 2] 20 [4, 5] Functions All LIST func... - https://man.mtool.work/duckdb/2.0/sql/data_types/array.html
- List Type 8612
- A LIST column encodes lists of values. Fields in the column can have values with different lengths, but they must all have the same underlying type. LIST s are typically used to store arrays of numbers, but can contain any uniform data type
...es the ARRAY type . Creating Lists Lists can be created using the list_value(expr, ...) function or the equivalent bracket notation [expr, ...] . The expressions can be constants or arbitrary expressions. To create a list from a table column, use the lis...VARCHAR[]); Retrieving from Lists Retrieving one or more values from a list can be accomplished using brackets and slicing notation, or through list functions like list_extract . Multiple equivalent functions are provided as aliases for compatibility wit... - https://man.mtool.work/duckdb/2.0/sql/data_types/list.html
- Map Type 7780
- MAP s are similar to STRUCT s in that they are an ordered list of key-value pairs. However, MAP s do not need to have the same keys present for each row, and thus are suitable for use cases where the schema is unknown beforehand or varies p
...ol MAP(INTEGER, DOUBLE)); Retrieving from Maps MAP values can be retrieved using the map_extract_value function or bracket notation: SELECT MAP {'key1': 5, 'key2': 43}['key1']; 5 If the key has the wrong type, an error is thrown. If it has the correct ty... - https://man.mtool.work/duckdb/2.0/sql/data_types/map.html
- Variant Type 7780
- The VARIANT type stores typed, binary data where each row is self-contained with its own type information. This differs from the JSON type , which is physically stored as text. Because type metadata is embedded per-value, VARIANT provides b
...─┴───────────────────┘ Extracting Fields from Nested Variants Fields can be extracted from nested VARIANT values using dot notation or the variant_extract function: SELECT data.name FROM events WHERE id = 4; SELECT variant_extract(data, 'name') AS name F... - https://man.mtool.work/duckdb/2.0/sql/data_types/variant.html
- inet Extension 7676
- The inet extension defines the INET data type for storing IPv4 and IPv6 Internet addresses. It supports the CIDR notation for subnet masks (e.g., 198.51.100.0/22 , 2001:db8:3c4d::/48 ). Installing and Loading The inet extension will be tran
... - https://man.mtool.work/duckdb/2.0/core_extensions/inet.html
- Profiling 7676
- Profiling is essential to help understand why certain queries exhibit specific performance characteristics. DuckDB contains several built-in features to enable query profiling, which this page covers. For a high-level example of using EXPLA
...be installed. It generates an HTML file and opens it in your web browser. python -m duckdb.query_graph /path/to/file.json Notation in Query Plans In query plans, the hash join operators adhere to the following convention: the probe side of the join is t... - https://man.mtool.work/duckdb/2.0/dev/profiling.html
DuckDB 2.0 Documentation / man.mtool.work