Module types

Source
Expand description

This module contains datatypes and functions which can be generated by sqlsmith.

Structsยง

CastSig
Provide internal CastSig which can be used for struct and list.

Staticsยง

AGG_FUNC_TABLE ๐Ÿ”’
Table which maps aggregate functionsโ€™ return types to possible function signatures.
BINARY_INEQUALITY_OP_TABLE ๐Ÿ”’
Build set of binary inequality functions like >, <, etcโ€ฆ Maps from LHS, RHS argument to Inequality Operation For instance: GreaterThanOrEqual(Int16, Int64) -> Boolean Will store an entry of: Key: Int16, Int64 Value: BinaryOp::GreaterThanOrEqual in the table.
EXPLICIT_CAST_TABLE ๐Ÿ”’
Build a cast map from return types to viable cast-signatures. NOTE: We avoid cast from varchar to other datatypes apart from itself. This is because arbitrary strings may not be able to cast, creating large number of invalid queries.
FUNC_BAN_LIST ๐Ÿ”’
Function ban list. These functions should be generated eventually, by adding expression constraints. If we naively generate arguments for these functions, it will affect sqlsmith effectiveness, e.g. cause it to crash.
FUNC_TABLE ๐Ÿ”’
Table which maps functionsโ€™ return types to possible function signatures.
IMPLICIT_CAST_TABLE ๐Ÿ”’
Build a cast map from return types to viable cast-signatures. NOTE: We avoid cast from varchar to other datatypes apart from itself. This is because arbitrary strings may not be able to cast, creating large number of invalid queries.
INVARIANT_FUNC_SET ๐Ÿ”’
Set of invariant functions

Functionsยง

data_type_name_to_ast_data_type ๐Ÿ”’
data_type_to_ast_data_type ๐Ÿ”’
expr_type_to_inequality_op ๐Ÿ”’