Hello
I have created a custom ValueMeta plugin that is working great except for some small issues.
Any time I try to sort rows that contain this custom ValueMeta using the Preview Data tab, I get a null pointer exception.
I have mostly narrowed it down to this method in ValueMetaBase -
Since it is a custom ValueMeta the switch case falls through to default where the
is null.
I have Overrided
method in my ValueMeta plugin to handle this particular case.
This overrided method is never executed because of line @1293 in TableView:
sourceValueMeta is always String (everything is converted to string). and defaults to ValueMetaBase for conversions.
What can I do to fix these issues ?
Have I misunderstood
method's purpose .. ?
I would appreciate your input!
I have created a custom ValueMeta plugin that is working great except for some small issues.
Any time I try to sort rows that contain this custom ValueMeta using the Preview Data tab, I get a null pointer exception.
I have mostly narrowed it down to this method in ValueMetaBase -
Code:
@Override
public Object convertDataUsingConversionMetaData( Object data ) throws KettleValueException {
if ( conversionMetadata == null ) {
throw new KettleValueException(
"API coding error: please specify the conversion metadata before attempting to convert value " + name );
}
switch ( conversionMetadata.getType() ) {
case TYPE_STRING:
return getString( data );
case TYPE_INTEGER:
return getInteger( data );
case TYPE_NUMBER:
return getNumber( data );
case TYPE_DATE:
return getDate( data );
case TYPE_BIGNUMBER:
return getBigNumber( data );
case TYPE_BOOLEAN:
return getBoolean( data );
case TYPE_BINARY:
return getBinary( data );
default:
throw new KettleValueException( toString() + " : I can't convert the specified value to data type : "
+ storageMetadata.getType() );
}
}
Code:
storageMetadata
I have Overrided
Code:
convertDataUsingConversionMetaData(Object object)
This overrided method is never executed because of line @1293 in TableView:
Code:
r[j + 2] = sourceValueMeta.convertDataUsingConversionMetaData( data );
What can I do to fix these issues ?
Have I misunderstood
Code:
convertDataUsingConversionMetaData
I would appreciate your input!