cgivre commented on a change in pull request #1978: DRILL-7578: HDF5 Metadata
Queries Fail with Large Files
URL: https://github.com/apache/drill/pull/1978#discussion_r384901864
##########
File path:
contrib/format-hdf5/src/main/java/org/apache/drill/exec/store/hdf5/HDF5BatchReader.java
##########
@@ -1032,11 +1081,11 @@ private void getAndMapCompoundData(String path,
List<String> fieldNames, IHDF5Re
SchemaBuilder innerSchema = new SchemaBuilder();
MapBuilder mapBuilder = innerSchema.addMap(COMPOUND_DATA_FIELD_NAME);
-
for (HDF5CompoundMemberInformation info : infos) {
fieldNames.add(info.getName());
+ String compoundColumnDataType =
info.getType().tryGetJavaType().getSimpleName();
- switch (info.getType().tryGetJavaType().getSimpleName()) {
+ switch (compoundColumnDataType) {
Review comment:
The `getType()` is actually a poorly named method in that it doesn't return
the type, but rather an `HDF5DataTypeInformation` object[1]. Once you have this
object, you still have to call one of the various methods like
`tryGetJavaType()` to actually get a data type that is useful.
Bottom line, you'd still have to call all that somewhere and either use a
switch statement or if statements to process the data type.
[1]:
http://svnsis.ethz.ch/doc/openbis/S175.0/ch/systemsx/cisd/hdf5/HDF5DataTypeInformation.html
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services