You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kernel/kernel-defaults/src/main/java/io/delta/kernel/defaults/internal/data/vector/DefaultVariantVector.java
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,12 @@ public class DefaultVariantVector
37
37
* Create an instance of {@link io.delta.kernel.data.ColumnVector} for array type.
38
38
*
39
39
* @param size number of elements in the vector.
40
+
* @param type {@code variant} datatype definition.
40
41
* @param nullability Optional array of nullability value for each element in the vector.
41
42
* All values in the vector are considered non-null when parameter is
42
43
* empty.
43
-
* @param offsets Offsets into element vector on where the index of particular row
44
-
* values start and end.
45
-
* @param elementVector Vector containing the array elements.
44
+
* @param value The child binary column vector representing each variant's values.
45
+
* @param metadata The child binary column vector representing each variant's metadata.
46
46
*/
47
47
publicDefaultVariantVector(
48
48
intsize,
@@ -84,6 +84,13 @@ public byte[] getMetadata() {
84
84
};
85
85
}
86
86
87
+
/**
88
+
* Get the child column vector at the given {@code ordinal}. Variants should only have two
89
+
* child vectors, one for value and one for metadata.
Copy file name to clipboardExpand all lines: kernel/kernel-defaults/src/test/scala/io/delta/kernel/defaults/internal/parquet/ParquetFileReaderSuite.scala
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -193,13 +193,10 @@ class ParquetFileReaderSuite extends AnyFunSuite
193
193
parse_json(cast(id as string)),
194
194
null
195
195
) as array_v""",
196
-
"map('test', cast(null as variant)) as map_value_v",
197
-
"map(cast(null as variant), parse_json(cast(id as string))) as map_key_v",
196
+
"map('test', cast(null as variant)) as map_value_v"
198
197
)
199
198
}
200
199
201
-
// TODO(richardc-db): Add nested variant tests once `parse_json` expression is implemented.
0 commit comments