This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new bdb0583  feat(test): add data type fixtures (#47)
bdb0583 is described below

commit bdb0583e47acbfbe2436e711ebbcdeba8745798b
Author: Huanbing <[email protected]>
AuthorDate: Sun Aug 11 19:49:17 2024 +0800

    feat(test): add data type fixtures (#47)
---
 crates/paimon/tests/fixtures/array_type.json                          | 1 +
 crates/paimon/tests/fixtures/array_type_nullable.json                 | 1 +
 crates/paimon/tests/fixtures/bigint_type.json                         | 1 +
 crates/paimon/tests/fixtures/bigint_type_nullable.json                | 1 +
 crates/paimon/tests/fixtures/binary_type.json                         | 1 +
 crates/paimon/tests/fixtures/binary_type_nullable.json                | 1 +
 crates/paimon/tests/fixtures/boolean_type.json                        | 1 +
 crates/paimon/tests/fixtures/boolean_type_nullable.json               | 1 +
 crates/paimon/tests/fixtures/char_type.json                           | 1 +
 crates/paimon/tests/fixtures/char_type_nullable.json                  | 1 +
 crates/paimon/tests/fixtures/date_type.json                           | 1 +
 crates/paimon/tests/fixtures/date_type_nullable.json                  | 1 +
 crates/paimon/tests/fixtures/decimal_type.json                        | 1 +
 crates/paimon/tests/fixtures/decimal_type_nullable.json               | 1 +
 crates/paimon/tests/fixtures/double_type.json                         | 1 +
 crates/paimon/tests/fixtures/double_type_nullable.json                | 1 +
 crates/paimon/tests/fixtures/float_type.json                          | 1 +
 crates/paimon/tests/fixtures/float_type_nullable.json                 | 1 +
 crates/paimon/tests/fixtures/highly_complex_nested_row_type.json      | 1 +
 crates/paimon/tests/fixtures/int_type.json                            | 1 +
 crates/paimon/tests/fixtures/int_type_nullable.json                   | 1 +
 crates/paimon/tests/fixtures/local_zoned_timestamp_type.json          | 1 +
 crates/paimon/tests/fixtures/local_zoned_timestamp_type_nullable.json | 1 +
 crates/paimon/tests/fixtures/map_type.json                            | 1 +
 crates/paimon/tests/fixtures/map_type_nullable.json                   | 1 +
 crates/paimon/tests/fixtures/multiset_type.json                       | 1 +
 crates/paimon/tests/fixtures/multiset_type_nullable.json              | 1 +
 crates/paimon/tests/fixtures/row_type.json                            | 1 +
 crates/paimon/tests/fixtures/row_type_nullable.json                   | 1 +
 crates/paimon/tests/fixtures/smallint_type.json                       | 1 +
 crates/paimon/tests/fixtures/smallint_type_nullable.json              | 1 +
 crates/paimon/tests/fixtures/time_type.json                           | 1 +
 crates/paimon/tests/fixtures/time_type_nullable.json                  | 1 +
 crates/paimon/tests/fixtures/timestamp_type.json                      | 1 +
 crates/paimon/tests/fixtures/timestamp_type_nullable.json             | 1 +
 crates/paimon/tests/fixtures/tinyint_type.json                        | 1 +
 crates/paimon/tests/fixtures/tinyint_type_nullable.json               | 1 +
 crates/paimon/tests/fixtures/varbinary_type.json                      | 1 +
 crates/paimon/tests/fixtures/varbinary_type_nullable.json             | 1 +
 crates/paimon/tests/fixtures/varchar_type.json                        | 1 +
 crates/paimon/tests/fixtures/varchar_type_nullable.json               | 1 +
 41 files changed, 41 insertions(+)

diff --git a/crates/paimon/tests/fixtures/array_type.json 
b/crates/paimon/tests/fixtures/array_type.json
new file mode 100644
index 0000000..fc3bd41
--- /dev/null
+++ b/crates/paimon/tests/fixtures/array_type.json
@@ -0,0 +1 @@
+{"type":"ARRAY NOT NULL","element":"INT NOT NULL"}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/array_type_nullable.json 
b/crates/paimon/tests/fixtures/array_type_nullable.json
new file mode 100644
index 0000000..4f0833b
--- /dev/null
+++ b/crates/paimon/tests/fixtures/array_type_nullable.json
@@ -0,0 +1 @@
+{"type":"ARRAY","element":"INT"}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/bigint_type.json 
b/crates/paimon/tests/fixtures/bigint_type.json
new file mode 100644
index 0000000..5ea6e99
--- /dev/null
+++ b/crates/paimon/tests/fixtures/bigint_type.json
@@ -0,0 +1 @@
+"BIGINT NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/bigint_type_nullable.json 
b/crates/paimon/tests/fixtures/bigint_type_nullable.json
new file mode 100644
index 0000000..695bdbb
--- /dev/null
+++ b/crates/paimon/tests/fixtures/bigint_type_nullable.json
@@ -0,0 +1 @@
+"BIGINT"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/binary_type.json 
b/crates/paimon/tests/fixtures/binary_type.json
new file mode 100644
index 0000000..02bc757
--- /dev/null
+++ b/crates/paimon/tests/fixtures/binary_type.json
@@ -0,0 +1 @@
+"BINARY(22) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/binary_type_nullable.json 
b/crates/paimon/tests/fixtures/binary_type_nullable.json
new file mode 100644
index 0000000..93f4fdb
--- /dev/null
+++ b/crates/paimon/tests/fixtures/binary_type_nullable.json
@@ -0,0 +1 @@
+"BINARY(22)"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/boolean_type.json 
b/crates/paimon/tests/fixtures/boolean_type.json
new file mode 100644
index 0000000..2f80b50
--- /dev/null
+++ b/crates/paimon/tests/fixtures/boolean_type.json
@@ -0,0 +1 @@
+"BOOLEAN NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/boolean_type_nullable.json 
b/crates/paimon/tests/fixtures/boolean_type_nullable.json
new file mode 100644
index 0000000..1cf5104
--- /dev/null
+++ b/crates/paimon/tests/fixtures/boolean_type_nullable.json
@@ -0,0 +1 @@
+"BOOLEAN"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/char_type.json 
b/crates/paimon/tests/fixtures/char_type.json
new file mode 100644
index 0000000..aa9d98b
--- /dev/null
+++ b/crates/paimon/tests/fixtures/char_type.json
@@ -0,0 +1 @@
+"CHAR(33) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/char_type_nullable.json 
b/crates/paimon/tests/fixtures/char_type_nullable.json
new file mode 100644
index 0000000..5e56398
--- /dev/null
+++ b/crates/paimon/tests/fixtures/char_type_nullable.json
@@ -0,0 +1 @@
+"CHAR(33)"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/date_type.json 
b/crates/paimon/tests/fixtures/date_type.json
new file mode 100644
index 0000000..fe11e2b
--- /dev/null
+++ b/crates/paimon/tests/fixtures/date_type.json
@@ -0,0 +1 @@
+"DATE NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/date_type_nullable.json 
b/crates/paimon/tests/fixtures/date_type_nullable.json
new file mode 100644
index 0000000..7d5f646
--- /dev/null
+++ b/crates/paimon/tests/fixtures/date_type_nullable.json
@@ -0,0 +1 @@
+"DATE"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/decimal_type.json 
b/crates/paimon/tests/fixtures/decimal_type.json
new file mode 100644
index 0000000..3b95890
--- /dev/null
+++ b/crates/paimon/tests/fixtures/decimal_type.json
@@ -0,0 +1 @@
+"DECIMAL(10, 2) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/decimal_type_nullable.json 
b/crates/paimon/tests/fixtures/decimal_type_nullable.json
new file mode 100644
index 0000000..bf32ba6
--- /dev/null
+++ b/crates/paimon/tests/fixtures/decimal_type_nullable.json
@@ -0,0 +1 @@
+"DECIMAL(10, 2)"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/double_type.json 
b/crates/paimon/tests/fixtures/double_type.json
new file mode 100644
index 0000000..9f5a8fb
--- /dev/null
+++ b/crates/paimon/tests/fixtures/double_type.json
@@ -0,0 +1 @@
+"DOUBLE NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/double_type_nullable.json 
b/crates/paimon/tests/fixtures/double_type_nullable.json
new file mode 100644
index 0000000..40f0e1a
--- /dev/null
+++ b/crates/paimon/tests/fixtures/double_type_nullable.json
@@ -0,0 +1 @@
+"DOUBLE"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/float_type.json 
b/crates/paimon/tests/fixtures/float_type.json
new file mode 100644
index 0000000..b6b6b2d
--- /dev/null
+++ b/crates/paimon/tests/fixtures/float_type.json
@@ -0,0 +1 @@
+"FLOAT NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/float_type_nullable.json 
b/crates/paimon/tests/fixtures/float_type_nullable.json
new file mode 100644
index 0000000..137d5d5
--- /dev/null
+++ b/crates/paimon/tests/fixtures/float_type_nullable.json
@@ -0,0 +1 @@
+"FLOAT"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/highly_complex_nested_row_type.json 
b/crates/paimon/tests/fixtures/highly_complex_nested_row_type.json
new file mode 100644
index 0000000..8c1a72c
--- /dev/null
+++ b/crates/paimon/tests/fixtures/highly_complex_nested_row_type.json
@@ -0,0 +1 @@
+{"type":"ROW","fields":[{"id":0,"name":"outer_row1","type":{"type":"ROW","fields":[{"id":0,"name":"middle1_decimal","type":"DECIMAL(12,
 
3)"},{"id":1,"name":"middle1_inner_row1","type":{"type":"ROW","fields":[{"id":0,"name":"inner1_boolean","type":"BOOLEAN"},{"id":1,"name":"inner1_int","type":"INT"},{"id":2,"name":"inner1_varchar","type":"VARCHAR(100)"}]}},{"id":2,"name":"middle1_array","type":{"type":"ARRAY","element":{"type":"MAP","key":"VARCHAR(50)","value":"INT"}}}]}},{"id":1,"name":"
 [...]
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/int_type.json 
b/crates/paimon/tests/fixtures/int_type.json
new file mode 100644
index 0000000..8cbf54e
--- /dev/null
+++ b/crates/paimon/tests/fixtures/int_type.json
@@ -0,0 +1 @@
+"INT NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/int_type_nullable.json 
b/crates/paimon/tests/fixtures/int_type_nullable.json
new file mode 100644
index 0000000..542b451
--- /dev/null
+++ b/crates/paimon/tests/fixtures/int_type_nullable.json
@@ -0,0 +1 @@
+"INT"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/local_zoned_timestamp_type.json 
b/crates/paimon/tests/fixtures/local_zoned_timestamp_type.json
new file mode 100644
index 0000000..2fb9bc5
--- /dev/null
+++ b/crates/paimon/tests/fixtures/local_zoned_timestamp_type.json
@@ -0,0 +1 @@
+"TIMESTAMP(3) WITH LOCAL TIME ZONE NOT NULL"
\ No newline at end of file
diff --git 
a/crates/paimon/tests/fixtures/local_zoned_timestamp_type_nullable.json 
b/crates/paimon/tests/fixtures/local_zoned_timestamp_type_nullable.json
new file mode 100644
index 0000000..c0e1f61
--- /dev/null
+++ b/crates/paimon/tests/fixtures/local_zoned_timestamp_type_nullable.json
@@ -0,0 +1 @@
+"TIMESTAMP(6) WITH LOCAL TIME ZONE"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/map_type.json 
b/crates/paimon/tests/fixtures/map_type.json
new file mode 100644
index 0000000..3dba4e8
--- /dev/null
+++ b/crates/paimon/tests/fixtures/map_type.json
@@ -0,0 +1 @@
+{"type":"MAP NOT NULL","key":"VARCHAR(20)","value":"INT NOT NULL"}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/map_type_nullable.json 
b/crates/paimon/tests/fixtures/map_type_nullable.json
new file mode 100644
index 0000000..ac7cfb8
--- /dev/null
+++ b/crates/paimon/tests/fixtures/map_type_nullable.json
@@ -0,0 +1 @@
+{"type":"MAP","key":"VARCHAR(20)","value":"INT"}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/multiset_type.json 
b/crates/paimon/tests/fixtures/multiset_type.json
new file mode 100644
index 0000000..34a128d
--- /dev/null
+++ b/crates/paimon/tests/fixtures/multiset_type.json
@@ -0,0 +1 @@
+{"type":"MULTISET NOT NULL","element":"INT NOT NULL"}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/multiset_type_nullable.json 
b/crates/paimon/tests/fixtures/multiset_type_nullable.json
new file mode 100644
index 0000000..d18e22c
--- /dev/null
+++ b/crates/paimon/tests/fixtures/multiset_type_nullable.json
@@ -0,0 +1 @@
+{"type":"MULTISET","element":"INT"}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/row_type.json 
b/crates/paimon/tests/fixtures/row_type.json
new file mode 100644
index 0000000..4cd2c1c
--- /dev/null
+++ b/crates/paimon/tests/fixtures/row_type.json
@@ -0,0 +1 @@
+{"type":"ROW NOT NULL","fields":[{"id":0,"name":"a","type":"INT NOT 
NULL"},{"id":1,"name":"b","type":"VARCHAR(20) NOT NULL"}]}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/row_type_nullable.json 
b/crates/paimon/tests/fixtures/row_type_nullable.json
new file mode 100644
index 0000000..0ba0451
--- /dev/null
+++ b/crates/paimon/tests/fixtures/row_type_nullable.json
@@ -0,0 +1 @@
+{"type":"ROW","fields":[{"id":0,"name":"a","type":"INT"},{"id":1,"name":"b","type":"VARCHAR(20)"}]}
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/smallint_type.json 
b/crates/paimon/tests/fixtures/smallint_type.json
new file mode 100644
index 0000000..141790f
--- /dev/null
+++ b/crates/paimon/tests/fixtures/smallint_type.json
@@ -0,0 +1 @@
+"SMALLINT NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/smallint_type_nullable.json 
b/crates/paimon/tests/fixtures/smallint_type_nullable.json
new file mode 100644
index 0000000..e30ec7b
--- /dev/null
+++ b/crates/paimon/tests/fixtures/smallint_type_nullable.json
@@ -0,0 +1 @@
+"SMALLINT"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/time_type.json 
b/crates/paimon/tests/fixtures/time_type.json
new file mode 100644
index 0000000..d6ecc0f
--- /dev/null
+++ b/crates/paimon/tests/fixtures/time_type.json
@@ -0,0 +1 @@
+"TIME(9) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/time_type_nullable.json 
b/crates/paimon/tests/fixtures/time_type_nullable.json
new file mode 100644
index 0000000..c226143
--- /dev/null
+++ b/crates/paimon/tests/fixtures/time_type_nullable.json
@@ -0,0 +1 @@
+"TIME(0)"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/timestamp_type.json 
b/crates/paimon/tests/fixtures/timestamp_type.json
new file mode 100644
index 0000000..65c2818
--- /dev/null
+++ b/crates/paimon/tests/fixtures/timestamp_type.json
@@ -0,0 +1 @@
+"TIMESTAMP(6) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/timestamp_type_nullable.json 
b/crates/paimon/tests/fixtures/timestamp_type_nullable.json
new file mode 100644
index 0000000..a248dd6
--- /dev/null
+++ b/crates/paimon/tests/fixtures/timestamp_type_nullable.json
@@ -0,0 +1 @@
+"TIMESTAMP(6)"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/tinyint_type.json 
b/crates/paimon/tests/fixtures/tinyint_type.json
new file mode 100644
index 0000000..451d088
--- /dev/null
+++ b/crates/paimon/tests/fixtures/tinyint_type.json
@@ -0,0 +1 @@
+"TINYINT NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/tinyint_type_nullable.json 
b/crates/paimon/tests/fixtures/tinyint_type_nullable.json
new file mode 100644
index 0000000..9a802d7
--- /dev/null
+++ b/crates/paimon/tests/fixtures/tinyint_type_nullable.json
@@ -0,0 +1 @@
+"TINYINT"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/varbinary_type.json 
b/crates/paimon/tests/fixtures/varbinary_type.json
new file mode 100644
index 0000000..0c7c9e2
--- /dev/null
+++ b/crates/paimon/tests/fixtures/varbinary_type.json
@@ -0,0 +1 @@
+"VARBINARY(233) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/varbinary_type_nullable.json 
b/crates/paimon/tests/fixtures/varbinary_type_nullable.json
new file mode 100644
index 0000000..96f3ecd
--- /dev/null
+++ b/crates/paimon/tests/fixtures/varbinary_type_nullable.json
@@ -0,0 +1 @@
+"VARBINARY(233)"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/varchar_type.json 
b/crates/paimon/tests/fixtures/varchar_type.json
new file mode 100644
index 0000000..1fe827d
--- /dev/null
+++ b/crates/paimon/tests/fixtures/varchar_type.json
@@ -0,0 +1 @@
+"VARCHAR(33) NOT NULL"
\ No newline at end of file
diff --git a/crates/paimon/tests/fixtures/varchar_type_nullable.json 
b/crates/paimon/tests/fixtures/varchar_type_nullable.json
new file mode 100644
index 0000000..f99e94b
--- /dev/null
+++ b/crates/paimon/tests/fixtures/varchar_type_nullable.json
@@ -0,0 +1 @@
+"VARCHAR(33)"
\ No newline at end of file

Reply via email to