@Override
  public int compare( Object data1, Object data2 ) throws KettleValueException {
    boolean n1 = isNull( data1 );
    boolean n2 = isNull( data2 );

    if ( n1 && !n2 ) {
      if ( isSortedDescending() ) {
        // BACKLOG-14028
        return 1;
      } else {
        return -1;
      }
    }
    if ( !n1 && n2 ) {
      if ( isSortedDescending() ) {
        return -1;
      } else {
        return 1;
      }
    }
    if ( n1 && n2 ) {
      return 0;
    }

    int cmp = 0;

    //If a comparator is not provided, default to the type comparisons
    if ( comparator == null ) {
      cmp = typeCompare( data1, data2 );
    } else {
      cmp = comparator.compare( data1, data2 );
    }

    if ( isSortedDescending() ) {
      return -cmp;
    } else {
      return cmp;
    }
  }
@Test
  public void testCompareIntegerToDouble() throws KettleValueException {
    ValueMetaBase intMeta = new ValueMetaBase( "int", ValueMetaInterface.TYPE_INTEGER );
    Long int1 = 2L;
    ValueMetaBase numberMeta = new ValueMetaBase( "number", ValueMetaInterface.TYPE_NUMBER );
    Double double2 = 1.5D;
    assertEquals( 1, intMeta.compare( int1, numberMeta, double2 ) );
  }