Updated Branches: refs/heads/master c1c6f83ea -> 0652815f5
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/0652815f/tajo-core/tajo-core-backend/src/main/proto/DataTypes.proto ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/main/proto/DataTypes.proto b/tajo-core/tajo-core-backend/src/main/proto/DataTypes.proto new file mode 100644 index 0000000..262ecac --- /dev/null +++ b/tajo-core/tajo-core-backend/src/main/proto/DataTypes.proto @@ -0,0 +1,74 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +option java_package = "tajo.common"; +option java_outer_classname = "TajoDataTypes"; +option optimize_for = SPEED; +option java_generic_services = false; +option java_generate_equals_and_hash = true; + +enum Type { + // SQL Standard Data Type + BOOLEAN = 0; // state of true of false [1 byte] + + INT1 = 1; // tinyint [1 byte] [0-255] + INT2 = 2; // smallint [2 bytes] [-2^15(-32,768) ~ 2^15-1(32,767)] + INT4 = 3; // int [4 bytes] [-2^31(-2,147,483,648) ~ 2^31-1(2,147,483,647)] + INT8 = 4; // bigint [8 bytes] [-2^63(-9,223,372,036,854,775,808) ~ 2^63-1(9,223,372,036,854,775,807)] + + FLOAT4 = 10; // variable-precision, inexact [4 bytes] + FLOAT8 = 11; // variable-precision, inexact [8 bytes] + + NUMERIC = 15; // variable length + DECIMAL = 16; // variable length + + CHAR = 20; // fixed-width n-character string + NCHAR = 21; // fixed width string supporting an international character set + VARCHAR = 22; // variable-width string + NVARCHAR = 23; // variable-width NCHAR string + TEXT = 24; // variable unlimited length + + DATE = 30; + TIME = 31; + TIMEZ = 32; + TIMESTAMP = 33; + TIMESTAMPZ = 34; + INTERVAL = 35; + + BIT = 40; // fixed-width bits. BIT without the length L means a single bit. It can be used for boolean type. + VARBIT = 41; // variable-width bits + + BINARY = 45; // fixed-width binary strings. BINARY without the length L means a single byte. + VARBINARY = 46; // variable-width binary strings + BLOB = 47; + + UDT = 51; // user-defined function + + ANY = 61; + ARRAY = 62; + INET4 = 100; + INET6 = 101; + + // Extended Data Type (Reserved 128 ~ 255) +} + +message DataType { + required Type type = 1; + optional int32 length = 2; + optional string code = 3; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/0652815f/tajo-core/tajo-core-storage/src/main/proto/DataTypes.proto ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-storage/src/main/proto/DataTypes.proto b/tajo-core/tajo-core-storage/src/main/proto/DataTypes.proto new file mode 100644 index 0000000..c8b18cb --- /dev/null +++ b/tajo-core/tajo-core-storage/src/main/proto/DataTypes.proto @@ -0,0 +1,74 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +option java_package = "tajo.common"; +option java_outer_classname = "TajoDataTypes"; +option optimize_for = SPEED; +option java_generic_services = false; +option java_generate_equals_and_hash = true; + +enum Type { + // SQL Standard Data Type + BOOLEAN = 0; // state of true of false [1 byte] + + INT1 = 1; // tinyint [1 byte] [0-255] + INT2 = 2; // smallint [2 bytes] [-2^15(-32,768) ~ 2^15-1(32,767)] + INT4 = 3; // int [4 bytes] [-2^31(-2,147,483,648) ~ 2^31-1(2,147,483,647)] + INT8 = 4; // bigint [8 bytes] [-2^63(-9,223,372,036,854,775,808) ~ 2^63-1(9,223,372,036,854,775,807)] + + FLOAT4 = 10; // variable-precision, inexact [4 bytes] + FLOAT8 = 11; // variable-precision, inexact [8 bytes] + + NUMERIC = 15; // variable length + DECIMAL = 16; // variable length + + CHAR = 20; // fixed-width n-character string + NCHAR = 21; // fixed width string supporting an international character set + VARCHAR = 22; // variable-width string + NVARCHAR = 23; // variable-width NCHAR string + TEXT = 24; // variable unlimited length + + DATE = 30; + TIME = 31; + TIMEZ = 32; + TIMESTAMP = 33; + TIMESTAMPZ = 34; + INTERVAL = 35; + + BIT = 40; // fixed-width bits. BIT without the length L means a single bit. It can be used for boolean type. + VARBIT = 41; // variable-width bits + + BINARY = 45; // fixed-width binary strings. BINARY without the length L means a single byte. + VARBINARY = 46; // variable-width binary strings + BLOB = 47; + + UDT = 51; // user-defined function + + ANY = 61; + ARRAY = 62; + INET4 = 100; + INET6 = 101; + + // Extended Data Type (Reserved 128 ~ 255) +} + +message DataType { + required Type type = 1; + optional int32 length = 2; + optional string code = 3; +} \ No newline at end of file
