-
Notifications
You must be signed in to change notification settings - Fork 3
Labels
Description
Is your feature request related to a problem? Please describe.
In the current neug type system, variable-length strings are described via string.var_char in schema YAML with optional max_length (e.g. max_length: 65536), but there is no user-facing, explicit VARCHAR(max_length) type. Users cannot use syntax like VARCHAR(256) in DDL or queries to specify the maximum length of variable-length strings, which hinders clear semantics and storage/validation optimizations.
Describe the solution you'd like
Add VARCHAR(max_length) to the neug type system so that users can explicitly specify the maximum length of variable-length strings, for example:
- Support syntax such as
VARCHAR(256)andVARCHAR(1024)in DDL or schema definitions; - Map internally to the existing
LogicalType::STRING(max_length)andVarcharExtraInfo; - Keep semantics consistent with the current YAML schema
string.var_char.max_lengthand handle parsing, validation, and serialization uniformly.
Describe alternatives you've considered
- Rely only on existing YAML
var_char.max_length: no DDL/syntax-level VARCHAR(n), so users must hand-write YAML in schema files, which does not align well with unified DDL and tooling. - Use a fixed default max length (e.g. 65536): users cannot lower the limit when needed, which is less ideal for storage and constraints.
Additional context
- The codebase already has
VARCHAR_DEFAULT_LENGTH,VarcharExtraInfo,LogicalType::STRING(size_t max_length), and YAML parsing forstring.var_char.max_length(seeg_type_utils.h,types.h,modern_schema.yaml). This request is mainly to add explicit VARCHAR(max_length) support and consistent exposure at the type system’s external interface.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To do