[fix](ParquetReader) definition level of repeated parent is wrong (#17337)
Fix three bugs: 1. `repeated_parent_def_level ` should be the definition of its repeated parent. 2. Failed to parse schema like `decimal(p, s)` 3. Fill wrong offsets for array type
This commit is contained in:
@ -676,13 +676,18 @@ public class HiveMetaStoreClientHelper {
|
||||
*/
|
||||
private static int findNextNestedField(String commaSplitFields) {
|
||||
int numLess = 0;
|
||||
int numBracket = 0;
|
||||
for (int i = 0; i < commaSplitFields.length(); i++) {
|
||||
char c = commaSplitFields.charAt(i);
|
||||
if (c == '<') {
|
||||
numLess++;
|
||||
} else if (c == '>') {
|
||||
numLess--;
|
||||
} else if (c == ',' && numLess == 0) {
|
||||
} else if (c == '(') {
|
||||
numBracket++;
|
||||
} else if (c == ')') {
|
||||
numBracket--;
|
||||
} else if (c == ',' && numLess == 0 && numBracket == 0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user