Search in sources :

Example 1 with ListObjectsEqualComparer

use of org.apache.hadoop.hive.serde2.objectinspector.ListObjectsEqualComparer in project hive by apache.

the class KeyWrapperFactory method getKeyWrapper.

public KeyWrapper getKeyWrapper() {
    if (keyFields.length == 1 && TypeInfoUtils.getTypeInfoFromObjectInspector(keyObjectInspectors[0]).equals(TypeInfoFactory.stringTypeInfo)) {
        assert (TypeInfoUtils.getTypeInfoFromObjectInspector(currentKeyObjectInspectors[0]).equals(TypeInfoFactory.stringTypeInfo));
        soi_new = (StringObjectInspector) keyObjectInspectors[0];
        soi_copy = (StringObjectInspector) currentKeyObjectInspectors[0];
        return new TextKeyWrapper(false);
    } else {
        currentStructEqualComparer = new ListObjectsEqualComparer(currentKeyObjectInspectors, currentKeyObjectInspectors);
        newKeyStructEqualComparer = new ListObjectsEqualComparer(currentKeyObjectInspectors, keyObjectInspectors);
        return new ListKeyWrapper(false);
    }
}
Also used : ListObjectsEqualComparer(org.apache.hadoop.hive.serde2.objectinspector.ListObjectsEqualComparer)

Example 2 with ListObjectsEqualComparer

use of org.apache.hadoop.hive.serde2.objectinspector.ListObjectsEqualComparer in project SQLWindowing by hbutani.

the class WindowingKeyWrapperFactory method getWindowingKeyWrapper.

public WindowingKeyWrapper getWindowingKeyWrapper() {
    if (keyFields.length == 1 && TypeInfoUtils.getTypeInfoFromObjectInspector(keyObjectInspectors[0]).equals(TypeInfoFactory.stringTypeInfo)) {
        assert (TypeInfoUtils.getTypeInfoFromObjectInspector(currentKeyObjectInspectors[0]).equals(TypeInfoFactory.stringTypeInfo));
        soi_new = (StringObjectInspector) keyObjectInspectors[0];
        soi_copy = (StringObjectInspector) currentKeyObjectInspectors[0];
        return new TextWindowingKeyWrapper(false);
    } else {
        currentStructEqualComparer = new ListObjectsEqualComparer(currentKeyObjectInspectors, currentKeyObjectInspectors);
        newKeyStructEqualComparer = new ListObjectsEqualComparer(currentKeyObjectInspectors, keyObjectInspectors);
        return new ListWindowingKeyWrapper(false);
    }
}
Also used : ListObjectsEqualComparer(org.apache.hadoop.hive.serde2.objectinspector.ListObjectsEqualComparer)

Aggregations

ListObjectsEqualComparer (org.apache.hadoop.hive.serde2.objectinspector.ListObjectsEqualComparer)2