Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions meta/src/meta/grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
%nonterm false logic.Disjunction
%nonterm ffi logic.FFI
%nonterm ffi_args Sequence[logic.Abstraction]
%nonterm fixed_type logic.FixedType
%nonterm float_type logic.FloatType
%nonterm float32_type logic.Float32Type
%nonterm formula logic.Formula
Expand Down Expand Up @@ -579,6 +580,10 @@ type
construct: $$ = logic.Type(uint32_type=$1)
deconstruct if builtin.has_proto_field($$, 'uint32_type'):
$1: logic.UInt32Type = $$.uint32_type
| fixed_type
construct: $$ = logic.Type(fixed_type=$1)
deconstruct if builtin.has_proto_field($$, 'fixed_type'):
$1: logic.FixedType = $$.fixed_type

unspecified_type
: "UNKNOWN"
Expand Down Expand Up @@ -635,6 +640,12 @@ decimal_type
$3: Int64 = builtin.int32_to_int64($$.precision)
$4: Int64 = builtin.int32_to_int64($$.scale)

fixed_type
: "(" "FIXED" INT ")"
construct: $$ = logic.FixedType(length=builtin.int64_to_int32($3))
deconstruct:
$3: Int64 = builtin.int32_to_int64($$.length)

boolean_type
: "BOOLEAN"
construct: $$ = logic.BooleanType()
Expand Down
6 changes: 6 additions & 0 deletions proto/relationalai/lqp/v1/logic.proto
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ message Type {
Int32Type int32_type = 12;
Float32Type float32_type = 13;
UInt32Type uint32_type = 14;
FixedType fixed_type = 15;
}
}

Expand Down Expand Up @@ -459,6 +460,11 @@ message Float32Type {}

message UInt32Type {}

// A fixed-length byte array of `length` bytes.
message FixedType {
int32 length = 1;
}

message Value {
oneof value {
string string_value = 1;
Expand Down
371 changes: 221 additions & 150 deletions sdks/go/src/lqp/v1/logic.pb.go

Large diffs are not rendered by default.

Loading
Loading