Results of 1 - 10 of about 63 for Strings (0.003 sec.)
- Text Types 13870
- In DuckDB, strings can be stored in the VARCHAR field. The field allows storage of Unicode characters. Internally, the data is encoded as UTF-8. Name Aliases Description VARCHAR CHAR , BPCHAR , STRING , TEXT Variable-length character string
...equired and has no effect on the system. Specifying the length will not improve performance or reduce storage space of the strings in the database. These variants are supported for compatibility with other systems that do require a length to be specifie...d for strings. If you wish to restrict the number of characters in a VARCHAR column for data integrity reasons the CHECK constraint shou...ld be used, for example: CREATE TABLE strings ( val VARCHAR CHECK (length(val) <= 10) -- val has a maximum length of 10 ); The VARCHAR field allows storage of Unicode c... - https://man.mtool.work/duckdb/2.0/sql/data_types/text.html
- Text Functions 11940
- Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a
...ive values are accepted. string LIKE target Returns true if the string matches the like specifier (see Pattern Matching ). string SIMILAR TO regex Returns true if the string matches the regex (see Pattern Matching ). string ^@ search_string Alias for st...arts_with . arg1 || arg2 Concatenates two strings, lists, or blobs. Any NULL input results in NULL . See also concat(arg1, arg2, ...) and list_concat(list1, list2, ...) . a...ns a character which is corresponding the ASCII code value or Unicode code point. concat(value, ...) Concatenates multiple strings or lists. NULL inputs are skipped. See also operator || . concat_ws(separator, string, ...) Concatenates many strings, sep... - https://man.mtool.work/duckdb/2.0/sql/functions/text.html
- Timestamp Types 10860
- Timestamps represent points in time. As such, they combine DATE and TIME information. They can be created using the type name followed by a string formatted according to the ISO 8601 format, YYYY-MM-DD hh:mm:ss[.zzzzzzzzz][+-TT[:tt]] , whic
...al temporal logic. It is a common data cleaning problem to disambiguate such observations, which may also be stored in raw strings without time zone specification or UTC offsets, into unambiguous TIMESTAMP WITH TIME ZONE instants. One possible solution...to this is to append UTC offsets to strings, followed by an explicit cast to TIMESTAMP WITH TIME ZONE . Alternatively, a TIMESTAMP WITHOUT TIME ZONE may be created fi...then be combined with a time zone specification to obtain a time zone aware TIMESTAMP WITH TIME ZONE . Conversion between Strings and Naïve / Time Zone-Aware Timestamps The conversion between strings without UTC offsets or IANA time zone names and WITH... - https://man.mtool.work/duckdb/2.0/sql/data_types/timestamp.html
- Schema 9348
- Types It is important to use the correct type for encoding columns (e.g., BIGINT , DATE , DATETIME ). While it is always possible to use string types ( VARCHAR , etc.) to encode more specific values, this is not recommended. Strings use mor
...results show that using the DATETIME value yields smaller storage sizes and faster processing. Microbenchmark: Joining on Strings We illustrate the difference caused by joining on different types by computing a self-join on the LDBC Comment table at sc...BIGINT BIGINT 70368755640078 1.2 s BIGINT VARCHAR '70368755640078' 2.1 s Bestpractice Avoid representing numeric values as strings, especially if you intend to perform e.g., join operations on them. Encoding Repeated Strings as a Dimension Table When a...S field_pk FROM (SELECT DISTINCT field_name FROM fact_table); Then run the aggregation using the integer keys and join the strings back in only at the end, once the result set is small: WITH rollup AS ( SELECT field_pk, count(*) AS count FROM fact_table... - https://man.mtool.work/duckdb/2.0/guides/performance/schema.html
- Python Function API 9031
- You can create a DuckDB user-defined function (UDF) from a Python function so it can be used in SQL queries. Similarly to regular functions , they need to have a name, a return type and parameter types. Creating Functions To register a Pyth
...tches. import duckdb import pyarrow as pa from duckdb.sqltypes import VARCHAR from pyarrow import compute as pc def mirror(strings: pa.Array, sep: pa.Array) -> pa.Array: assert isinstance(strings, pa.ChunkedArray) assert isinstance(sep, pa.ChunkedArray)...return pc.binary_join_element_wise(strings, pc.ascii_reverse(strings), sep) duckdb.create_function( "mirror", mirror, [VARCHAR, VARCHAR], return_type=VARCHAR, type="...arrow", ) duckdb.sql( "CREATE OR REPLACE TABLE strings AS SELECT 'hello' AS str UNION ALL SELECT 'world' AS str;" ) print(duckdb.sql("SELECT mirror(str, '|') FROM strings;").fet... - https://man.mtool.work/duckdb/2.0/clients/python/function.html
- List Functions 8815
- Function Description list[index] Extracts a single list element using a (1-based) index . list[begin[:end][:step]] Extracts a sublist using slice conventions . Negative values are accepted. list1 && list2 Alias for list_has_any . list1 <->
...e_distance . list1 <@ list2 Alias for list_has_all . list1 @> list2 Alias for list_has_all . arg1 || arg2 Concatenates two strings, lists, or blobs. Any NULL input results in NULL . See also concat(arg1, arg2, ...) and list_concat(list1, list2, ...) . a.... char_length(list) Alias for length . character_length(list) Alias for length . concat(value, ...) Concatenates multiple strings or lists. NULL inputs are skipped. See also operator || . contains(list, element) Returns true if the list contains the el...accepted. | | Example | [4, 5, 6][3] | | Result | 6 | | Alias | list_slice | arg1 || arg2 | Description | Concatenates two strings, lists, or blobs. Any NULL input results in NULL . See also concat(arg1, arg2, ...) and list_concat(list1, list2, ...) . |... - https://man.mtool.work/duckdb/2.0/sql/functions/list.html
- Result Verification 8599
- The standard way of verifying results of queries is using the query statement, followed by the letter I times the number of columns that are expected in the result. After the query, four dashes ( ---- ) are expected followed by the result v
...st runner does not use or need them internally – therefore, only I should be used to denote columns. NULL Values and Empty Strings Empty lines have special significance for the SQLLogic test runner: they signify an end of the current statement or query....For that reason, empty strings and NULL values have special syntax that must be used in result verification. NULL values should use the string NULL , and...empty strings should use the string (empty) , e.g.: query II SELECT NULL, '' ---- NULL (empty) Error Verification In order to signify th... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/result_verification.html
- Execution Format 8599
- Vector is the container format used to store in-memory data during execution. DataChunk is a collection of Vectors, used for instance to represent a column list in a PhysicalProjection operator. Data Flow DuckDB uses a vectorized query exec
...contents of the Vector. Every type of Vector can convert to this format. Complex Types String Vectors To efficiently store strings, we make use of our string_t class. struct string_t { union { struct { uint32_t length; char prefix[4]; char *ptr; } point...er; struct { uint32_t length; char inlined[12]; } inlined; } value; }; Short strings ( <= 12 bytes ) are inlined into the structure, while larger strings are stored with a pointer to the data in the auxiliar...y check for null-pointers. The prefix is used for comparisons as an early out (when the prefix does not match, we know the strings are not equal and don't need to chase any pointers). List Vectors List vectors are stored as a series of list entries toge... - https://man.mtool.work/duckdb/2.0/internals/vector.html
- Collations 8483
- Collations provide rules for how text should be sorted or compared in the execution engine. Collations are useful for localization, as the rules for how text should be ordered are different for different languages or for different countries
...y want to use when performing sorting and comparison operations. By default, the BINARY collation is used. That means that strings are ordered and compared based only on their binary contents. This makes sense for standard ASCII characters (i.e., the le...he NOCASE collation. For example, to use the German collation rules you could use the following code snippet: CREATE TABLE strings (s VARCHAR COLLATE DE); INSERT INTO strings VALUES ('Gabel'), ('Göbel'), ('Goethe'), ('Goldmann'), ('Göthe'), ('Götz'); SE...LECT * FROM strings ORDER BY s; "Gabel", "Göbel", "Goethe", "Goldmann", "Göthe", "Götz"... - https://man.mtool.work/duckdb/2.0/sql/expressions/collations.html
- Unit Tester Configuration 8383
- There are three ways of setting options for the unit tester: Command Line Arguments Configuration File Environment Variables Configuration Options List See the Configuration Options List for the full list of available options. Command Line
...g <string> Select tests which match named tag (as singleton set; multiple sets are OR'd) --select-tag-set <comma-separated strings> Select tests which match all named tags (multiple sets are OR'd) --settings <list[struct]> Set DuckDB configuration , str...d have keys name and value --skip-compiled , --no-skip-compiled Skip compiled tests --skip-error-messages <comma-separated strings> Skip rather than fail tests that fail with a message that contains any of these substrings --skip-tag <string> Skip tests...which match named tag (as singleton set; multiple sets are OR'd) --skip-tag-set <comma-separated strings> Skip tests which match all named tags (multiple sets are OR'd) --sort-style <none|rowsort|valuesort> Default sort style i... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/test_configuration.html
DuckDB 2.0 Documentation / man.mtool.work