Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove physical types, just have people use user defined types. #1

Closed
wants to merge 2 commits into from
Closed
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
210 changes: 13 additions & 197 deletions binary/type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,243 +29,72 @@ message Type {
UserDefined user_defined = 31;
}

message I8 {
PhysicalType physical_type = 1;
message I8 {}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}
message I16 {}

message U8 {
PhysicalType physical_type = 1;
message I32 {}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}
message I64 {}

message I16 {
PhysicalType physical_type = 1;
message FP32 {}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}
message FP64 {}

message U16 {
PhysicalType physical_type = 1;
message String {}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}
message Binary {}

message I32 {
PhysicalType physical_type = 1;
message Timestamp {}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}
message Date {}

message U32 {
PhysicalType physical_type = 1;
message Time {}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message I64 {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}
message IntervalYear {}

message U64 {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message FP16 {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message FP32 {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message FP64 {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message String {
PhysicalType physical_type = 1;
bool dictionary_encoded = 2;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
ARROW_LARGE_STRING = 1;
}
}

message Binary {
PhysicalType physical_type = 1;
bool dictionary_encoded = 2;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
ARROW_LARGE_BINARY = 1;
}
}

message Timestamp {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message Date {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message Time {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message IntervalYear {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message IntervalDay {
PhysicalType physical_type = 1;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
ARROW_MONTH_DAY_NANO = 1;
}
}
message IntervalDay {}

// Start compound types.
message FixedChar {
int32 length = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message VarChar {
int32 length = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message FixedBinary {
int32 length = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message Decimal {
int32 scale = 1;
int32 precision = 2;
PhysicalType physical_type = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
ARROW_128 = 1;
}
}

message Struct {
repeated Type types = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message NamedStruct {

repeated Pair pairs = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

message Pair {
string name = 1;
Type type = 2;
}

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message List {
Type type = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message Map {

repeated KeyValue key_values = 1;
PhysicalType physical_type = 2;
bool dictionary_encoded = 3;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
UTF8_ORDERED_KEYS = 1;
}

message KeyValue {
Type key = 1;
Expand All @@ -275,24 +104,11 @@ message Type {

message TimestampMicroTZ {
string timezone = 1;

PhysicalType physical_type = 2;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message TimestampTZ {
string timezone = 1;

PhysicalType physical_type = 2;

enum PhysicalType {
SYSTEM_DEFAULT = 0;
}
}

message UserDefined {
int32 organization = 1;
string name = 2;
Expand Down
5 changes: 2 additions & 3 deletions site/docs/spec/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ Once all portions of the specification have been moved to commit (or eliminated)

| Priority | Status | Section | Description |
| -------- | ------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| 1 | sketch | [Simple Logical Types](/types/simple_logical_types) | A way to describe the set of basic types that will be operated on within a plan. Only includes simple types such as integers and doubles (nothing configurable or compound). |
| | sketch | [Compound Logical Types](/types/compound_logical_types) | Expression of types that go beyond simple scalar values. Key concepts here include: configurable types such as fixed length and numeric types as well as compound types such as structs, maps, lists, etc. |
| | sketch | [Physical Types](/types/physical_types) | Physical extensions to logical types. |
| 1 | sketch | [Simple Types](/types/simple_logical_types) | A way to describe the set of basic types that will be operated on within a plan. Only includes simple types such as integers and doubles (nothing compound). |
| | sketch | [Compound Types](/types/compound_logical_types) | Expression of types that go beyond simple scalar values. Key concepts here include: configurable types such as fixed length and numeric types as well as compound types such as structs, maps, lists, etc. |
| | sketch | [User Defined Types](/types/user_defined_types) | Extensions that can be defined for specific IR producers/consumers. |
| 2 | sketch | [Field References](/expressions/field_references) | Expressions to identify which portions of a record should be |
| 3 | sketch | [Scalar Functions](/expressions/scalar_functions) | Description of how functions are specified. Concepts include arguments, variadic functions, output type derivation, etc. |
Expand Down
1 change: 0 additions & 1 deletion site/docs/types/_config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
arrange:
- simple_logical_types.md
- compound_logical_types.md
- physical_types.md
- user_defined_types.md
37 changes: 0 additions & 37 deletions site/docs/types/physical_types.md

This file was deleted.