mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 00:56:31 +08:00
Add unit test
This commit is contained in:
1 parent
9568a67448
commit
25980a37ae
1 file changed
+24
@@ -566,6 +566,16 @@ TEST(TestColumnDescriptor, TestAttrs) {
|
||||
ASSERT_EQ(Type::BYTE_ARRAY, descr.physical_type());
|
||||
|
||||
ASSERT_EQ(-1, descr.type_length());
|
||||
ASSERT_EQ(
|
||||
R"(column descriptor = {
|
||||
name: name
|
||||
path:
|
||||
physical_type: BYTE_ARRAY
|
||||
logical_type: UTF8
|
||||
max_definition_level: 4
|
||||
max_repetition_level: 1
|
||||
})",
|
||||
descr.ToString());
|
||||
|
||||
// Test FIXED_LEN_BYTE_ARRAY
|
||||
node = PrimitiveNode::Make("name", Repetition::OPTIONAL, Type::FIXED_LEN_BYTE_ARRAY,
|
||||
@@ -574,6 +584,20 @@ TEST(TestColumnDescriptor, TestAttrs) {
|
||||
|
||||
ASSERT_EQ(Type::FIXED_LEN_BYTE_ARRAY, descr.physical_type());
|
||||
ASSERT_EQ(12, descr.type_length());
|
||||
|
||||
ASSERT_EQ(
|
||||
R"(column descriptor = {
|
||||
name: name
|
||||
path:
|
||||
physical_type: FIXED_LEN_BYTE_ARRAY
|
||||
logical_type: DECIMAL
|
||||
max_definition_level: 4
|
||||
max_repetition_level: 1
|
||||
length: 12
|
||||
precision: 10
|
||||
scale: 4
|
||||
})",
|
||||
descr.ToString());
|
||||
}
|
||||
|
||||
class TestSchemaDescriptor : public ::testing::Test {
|
||||
|
||||
Reference in new issue
Block a user