Search in sources :

Example 16 with SmallTableGenerationParameters

use of org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters in project hive by apache.

the class TestMapJoinOperator method doTestLong1.

public boolean doTestLong1(long seed, int rowCount, int hiveConfVariation, VectorMapJoinVariation vectorMapJoinVariation, MapJoinPlanVariation mapJoinPlanVariation) throws Exception {
    HiveConf hiveConf = new HiveConf();
    if (!addLongHiveConfVariation(hiveConfVariation, hiveConf)) {
        return true;
    }
    TypeInfo[] bigTableTypeInfos = null;
    int[] bigTableKeyColumnNums = null;
    TypeInfo[] smallTableValueTypeInfos = null;
    int[] smallTableRetainKeyColumnNums = null;
    SmallTableGenerationParameters smallTableGenerationParameters = new SmallTableGenerationParameters();
    MapJoinTestDescription testDesc = null;
    MapJoinTestData testData = null;
    // Big Table: int key, long value; Small Table: no key retained, string value
    bigTableTypeInfos = new TypeInfo[] { TypeInfoFactory.intTypeInfo, TypeInfoFactory.longTypeInfo };
    bigTableKeyColumnNums = new int[] { 0 };
    smallTableRetainKeyColumnNums = new int[] {};
    smallTableValueTypeInfos = new TypeInfo[] { TypeInfoFactory.stringTypeInfo };
    testDesc = new MapJoinTestDescription(hiveConf, vectorMapJoinVariation, bigTableTypeInfos, bigTableKeyColumnNums, smallTableValueTypeInfos, smallTableRetainKeyColumnNums, smallTableGenerationParameters, mapJoinPlanVariation);
    if (!goodTestVariation(testDesc)) {
        return false;
    }
    testData = new MapJoinTestData(rowCount, testDesc, seed);
    executeTest(testDesc, testData, "testLong1");
    return false;
}
Also used : SmallTableGenerationParameters(org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters) HiveConf(org.apache.hadoop.hive.conf.HiveConf) DecimalTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Example 17 with SmallTableGenerationParameters

use of org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters in project hive by apache.

the class TestMapJoinOperator method doTestMultiKey3.

public boolean doTestMultiKey3(long seed, int hiveConfVariation, VectorMapJoinVariation vectorMapJoinVariation, MapJoinPlanVariation mapJoinPlanVariation) throws Exception {
    int rowCount = 10;
    HiveConf hiveConf = new HiveConf();
    if (!addNonLongHiveConfVariation(hiveConfVariation, hiveConf)) {
        return true;
    }
    TypeInfo[] bigTableTypeInfos = null;
    int[] bigTableKeyColumnNums = null;
    TypeInfo[] smallTableValueTypeInfos = null;
    int[] smallTableRetainKeyColumnNums = null;
    SmallTableGenerationParameters smallTableGenerationParameters = new SmallTableGenerationParameters();
    MapJoinTestDescription testDesc = null;
    MapJoinTestData testData = null;
    // Three key columns.
    bigTableTypeInfos = new TypeInfo[] { TypeInfoFactory.dateTypeInfo, TypeInfoFactory.byteTypeInfo };
    bigTableKeyColumnNums = new int[] { 0, 1 };
    smallTableRetainKeyColumnNums = new int[] { 0, 1 };
    smallTableValueTypeInfos = new TypeInfo[] {};
    // ----------------------------------------------------------------------------------------------
    testDesc = new MapJoinTestDescription(hiveConf, vectorMapJoinVariation, bigTableTypeInfos, bigTableKeyColumnNums, smallTableValueTypeInfos, smallTableRetainKeyColumnNums, smallTableGenerationParameters, mapJoinPlanVariation);
    if (!goodTestVariation(testDesc)) {
        return false;
    }
    // Prepare data.  Good for ANY implementation variation.
    testData = new MapJoinTestData(rowCount, testDesc, seed);
    executeTest(testDesc, testData, "testMultiKey3");
    return false;
}
Also used : SmallTableGenerationParameters(org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters) HiveConf(org.apache.hadoop.hive.conf.HiveConf) DecimalTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Example 18 with SmallTableGenerationParameters

use of org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters in project hive by apache.

the class TestMapJoinOperator method doTestLong3_NoRegularKeys.

public boolean doTestLong3_NoRegularKeys(long seed, int rowCount, int hiveConfVariation, VectorMapJoinVariation vectorMapJoinVariation, MapJoinPlanVariation mapJoinPlanVariation) throws Exception {
    HiveConf hiveConf = new HiveConf();
    if (!addLongHiveConfVariation(hiveConfVariation, hiveConf)) {
        return true;
    }
    TypeInfo[] bigTableTypeInfos = null;
    int[] bigTableKeyColumnNums = null;
    TypeInfo[] smallTableValueTypeInfos = null;
    int[] smallTableRetainKeyColumnNums = null;
    SmallTableGenerationParameters smallTableGenerationParameters = new SmallTableGenerationParameters();
    smallTableGenerationParameters.setValueOption(ValueOption.NO_REGULAR_SMALL_KEYS);
    MapJoinTestDescription testDesc = null;
    MapJoinTestData testData = null;
    // Big Table: int key, string value; Small Table: key retained, decimal value
    bigTableTypeInfos = new TypeInfo[] { TypeInfoFactory.intTypeInfo, TypeInfoFactory.stringTypeInfo };
    bigTableKeyColumnNums = new int[] { 0 };
    smallTableRetainKeyColumnNums = new int[] { 0 };
    smallTableValueTypeInfos = new TypeInfo[] { new DecimalTypeInfo(38, 18) };
    testDesc = new MapJoinTestDescription(hiveConf, vectorMapJoinVariation, bigTableTypeInfos, bigTableKeyColumnNums, smallTableValueTypeInfos, smallTableRetainKeyColumnNums, smallTableGenerationParameters, mapJoinPlanVariation);
    if (!goodTestVariation(testDesc)) {
        return false;
    }
    testData = new MapJoinTestData(rowCount, testDesc, seed);
    executeTest(testDesc, testData, "doTestLong3_NoRegularKeys");
    return false;
}
Also used : DecimalTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo) SmallTableGenerationParameters(org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters) HiveConf(org.apache.hadoop.hive.conf.HiveConf) DecimalTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Example 19 with SmallTableGenerationParameters

use of org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters in project hive by apache.

the class TestMapJoinOperator method doTestLong6.

public boolean doTestLong6(long seed, int rowCount, int hiveConfVariation, VectorMapJoinVariation vectorMapJoinVariation, MapJoinPlanVariation mapJoinPlanVariation) throws Exception {
    HiveConf hiveConf = new HiveConf();
    if (!addLongHiveConfVariation(hiveConfVariation, hiveConf)) {
        return true;
    }
    TypeInfo[] bigTableTypeInfos = null;
    int[] bigTableKeyColumnNums = null;
    TypeInfo[] smallTableValueTypeInfos = null;
    int[] smallTableRetainKeyColumnNums = null;
    // Cause there to be no regular FULL OUTER MapJoin MATCHes so only non-match Small Table
    // results.
    SmallTableGenerationParameters smallTableGenerationParameters = new SmallTableGenerationParameters();
    MapJoinTestDescription testDesc = null;
    MapJoinTestData testData = null;
    // Big Table: long key, timestamp value; Small Table: key retained, no value
    // (exercise INNER_BIGONLY, LEFT_SEMI)
    bigTableTypeInfos = new TypeInfo[] { TypeInfoFactory.longTypeInfo, TypeInfoFactory.timestampTypeInfo };
    bigTableKeyColumnNums = new int[] { 0 };
    smallTableRetainKeyColumnNums = new int[] { 0 };
    smallTableValueTypeInfos = new TypeInfo[] {};
    testDesc = new MapJoinTestDescription(hiveConf, vectorMapJoinVariation, bigTableTypeInfos, bigTableKeyColumnNums, smallTableValueTypeInfos, smallTableRetainKeyColumnNums, smallTableGenerationParameters, mapJoinPlanVariation);
    if (!goodTestVariation(testDesc)) {
        return false;
    }
    testData = new MapJoinTestData(rowCount, testDesc, seed);
    executeTest(testDesc, testData, "testLong6");
    return false;
}
Also used : SmallTableGenerationParameters(org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters) HiveConf(org.apache.hadoop.hive.conf.HiveConf) DecimalTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Example 20 with SmallTableGenerationParameters

use of org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters in project hive by apache.

the class TestMapJoinOperator method doTestMultiKey2.

public boolean doTestMultiKey2(long seed, int hiveConfVariation, VectorMapJoinVariation vectorMapJoinVariation, MapJoinPlanVariation mapJoinPlanVariation) throws Exception {
    int rowCount = 10;
    HiveConf hiveConf = new HiveConf();
    if (!addNonLongHiveConfVariation(hiveConfVariation, hiveConf)) {
        return true;
    }
    TypeInfo[] bigTableTypeInfos = null;
    int[] bigTableKeyColumnNums = null;
    TypeInfo[] smallTableValueTypeInfos = null;
    int[] smallTableRetainKeyColumnNums = null;
    SmallTableGenerationParameters smallTableGenerationParameters = new SmallTableGenerationParameters();
    MapJoinTestDescription testDesc = null;
    MapJoinTestData testData = null;
    // Three key columns.
    bigTableTypeInfos = new TypeInfo[] { TypeInfoFactory.longTypeInfo, TypeInfoFactory.shortTypeInfo, TypeInfoFactory.stringTypeInfo };
    bigTableKeyColumnNums = new int[] { 0, 1, 2 };
    smallTableRetainKeyColumnNums = new int[] { 0, 1, 2 };
    smallTableValueTypeInfos = new TypeInfo[] { TypeInfoFactory.stringTypeInfo };
    // ----------------------------------------------------------------------------------------------
    testDesc = new MapJoinTestDescription(hiveConf, vectorMapJoinVariation, bigTableTypeInfos, bigTableKeyColumnNums, smallTableValueTypeInfos, smallTableRetainKeyColumnNums, smallTableGenerationParameters, mapJoinPlanVariation);
    if (!goodTestVariation(testDesc)) {
        return false;
    }
    // Prepare data.  Good for ANY implementation variation.
    testData = new MapJoinTestData(rowCount, testDesc, seed);
    executeTest(testDesc, testData, "testMultiKey0");
    return false;
}
Also used : SmallTableGenerationParameters(org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters) HiveConf(org.apache.hadoop.hive.conf.HiveConf) DecimalTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Aggregations

HiveConf (org.apache.hadoop.hive.conf.HiveConf)22 SmallTableGenerationParameters (org.apache.hadoop.hive.ql.exec.vector.mapjoin.MapJoinTestDescription.SmallTableGenerationParameters)22 TypeInfo (org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)22 DecimalTypeInfo (org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo)16 PrimitiveTypeInfo (org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo)3