|
5 | 5 | TypedValueConverter, |
6 | 6 | TypeNode, |
7 | 7 | TypeSignatureParser, |
8 | | - _normalize_hive_syntax, |
9 | 8 | ) |
10 | 9 |
|
11 | 10 |
|
@@ -109,55 +108,6 @@ def test_type_alias_in_complex_type(self): |
109 | 108 | assert node.type_name == "array" |
110 | 109 | assert node.children[0].type_name == "integer" |
111 | 110 |
|
112 | | - def test_hive_syntax_simple(self): |
113 | | - parser = TypeSignatureParser() |
114 | | - node = parser.parse(_normalize_hive_syntax("array<int>")) |
115 | | - assert node.type_name == "array" |
116 | | - assert node.children[0].type_name == "integer" |
117 | | - |
118 | | - def test_hive_syntax_struct(self): |
119 | | - parser = TypeSignatureParser() |
120 | | - node = parser.parse(_normalize_hive_syntax("struct<a:int,b:varchar>")) |
121 | | - assert node.type_name == "struct" |
122 | | - assert node.field_names == ["a", "b"] |
123 | | - assert node.children[0].type_name == "integer" |
124 | | - assert node.children[1].type_name == "varchar" |
125 | | - |
126 | | - def test_hive_syntax_nested(self): |
127 | | - parser = TypeSignatureParser() |
128 | | - node = parser.parse(_normalize_hive_syntax("array<struct<a:int,b:varchar>>")) |
129 | | - assert node.type_name == "array" |
130 | | - struct_node = node.children[0] |
131 | | - assert struct_node.type_name == "struct" |
132 | | - assert struct_node.field_names == ["a", "b"] |
133 | | - assert struct_node.children[0].type_name == "integer" |
134 | | - assert struct_node.children[1].type_name == "varchar" |
135 | | - |
136 | | - def test_hive_syntax_map(self): |
137 | | - parser = TypeSignatureParser() |
138 | | - node = parser.parse(_normalize_hive_syntax("map<string,int>")) |
139 | | - assert node.type_name == "map" |
140 | | - assert node.children[0].type_name == "string" |
141 | | - assert node.children[1].type_name == "integer" |
142 | | - |
143 | | - def test_mixed_syntax(self): |
144 | | - """Hive angle brackets wrapping Trino-style parenthesized inner type.""" |
145 | | - parser = TypeSignatureParser() |
146 | | - node = parser.parse(_normalize_hive_syntax("array<row(a int, b varchar)>")) |
147 | | - assert node.type_name == "array" |
148 | | - row_node = node.children[0] |
149 | | - assert row_node.type_name == "row" |
150 | | - assert row_node.field_names == ["a", "b"] |
151 | | - assert row_node.children[0].type_name == "integer" |
152 | | - assert row_node.children[1].type_name == "varchar" |
153 | | - |
154 | | - def test_normalize_hive_syntax_noop(self): |
155 | | - """Trino-style input passes through unchanged.""" |
156 | | - assert _normalize_hive_syntax("array(integer)") == "array(integer)" |
157 | | - |
158 | | - def test_normalize_hive_syntax_replaces(self): |
159 | | - assert _normalize_hive_syntax("array<struct<a:int>>") == "array(struct(a int))" |
160 | | - |
161 | 111 | def test_trailing_modifier_after_paren(self): |
162 | 112 | """Type with content after closing paren should not break parsing.""" |
163 | 113 | parser = TypeSignatureParser() |
|
0 commit comments