本文整理汇总了Java中org.apache.drill.exec.proto.UserBitShared.QueryType方法的典型用法代码示例。如果您正苦于以下问题:Java UserBitShared.QueryType方法的具体用法?Java UserBitShared.QueryType怎么用?Java UserBitShared.QueryType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.drill.exec.proto.UserBitShared
的用法示例。
在下文中一共展示了UserBitShared.QueryType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runTestsOnFile
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
public void runTestsOnFile(String filename, UserBitShared.QueryType queryType, String[] queries, long[] rowCounts) throws Exception {
if (VERBOSE_DEBUG) {
System.out.println("===================");
System.out.println("source data in json");
System.out.println("===================");
System.out.println(Files.toString(FileUtils.getResourceAsFile(filename), Charsets.UTF_8));
}
int i = 0;
for (String query : queries) {
if (VERBOSE_DEBUG) {
System.out.println("=====");
System.out.println("query");
System.out.println("=====");
System.out.println(query);
System.out.println("======");
System.out.println("result");
System.out.println("======");
}
int rowCount = testRunAndPrint(queryType, query);
assertEquals(rowCounts[i], rowCount);
System.out.println();
i++;
}
}
示例2: TestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
public TestBuilder(BufferAllocator allocator, String query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
this(allocator);
if (ordered == null) {
throw new RuntimeException("Ordering not set, when using a baseline file or query you must explicitly call the ordered() or unOrdered() method on the " + this.getClass().getSimpleName());
}
this.query = query;
this.queryType = queryType;
this.ordered = ordered;
this.approximateEquality = approximateEquality;
this.baselineTypeMap = baselineTypeMap;
this.baselineOptionSettingQueries = baselineOptionSettingQueries;
this.testOptionSettingQueries = testOptionSettingQueries;
this.highPerformanceComparison = highPerformanceComparison;
this.expectedNumBatches = expectedNumBatches;
}
示例3: runTestsOnFile
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
public void runTestsOnFile(String filename, UserBitShared.QueryType queryType, String[] queries, long[] rowCounts) throws Exception {
if (VERBOSE_DEBUG) {
System.out.println("===================");
System.out.println("source data in json");
System.out.println("===================");
System.out.println(Files.toString(DrillFileUtils.getResourceAsFile(filename), Charsets.UTF_8));
}
int i = 0;
for (String query : queries) {
if (VERBOSE_DEBUG) {
System.out.println("=====");
System.out.println("query");
System.out.println("=====");
System.out.println(query);
System.out.println("======");
System.out.println("result");
System.out.println("======");
}
int rowCount = testRunAndPrint(queryType, query);
assertEquals(rowCounts[i], rowCount);
System.out.println();
i++;
}
}
示例4: TestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
public TestBuilder(TestServices services, Object query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
this(services);
if (ordered == null) {
throw new RuntimeException("Ordering not set, when using a baseline file or query you must explicitly call the ordered() or unOrdered() method on the " + this.getClass().getSimpleName());
}
this.query = query;
this.queryType = queryType;
this.ordered = ordered;
this.approximateEquality = approximateEquality;
this.baselineTypeMap = baselineTypeMap;
this.baselineOptionSettingQueries = baselineOptionSettingQueries;
this.testOptionSettingQueries = testOptionSettingQueries;
this.highPerformanceComparison = highPerformanceComparison;
this.expectedNumBatches = expectedNumBatches;
}
示例5: getType
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
public UserBitShared.QueryType getType() {
UserBitShared.QueryType type = UserBitShared.QueryType.SQL;
switch (queryType) {
case "SQL" : type = UserBitShared.QueryType.SQL; break;
case "LOGICAL" : type = UserBitShared.QueryType.LOGICAL; break;
case "PHYSICAL" : type = UserBitShared.QueryType.PHYSICAL; break;
}
return type;
}
示例6: CSVTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
CSVTestBuilder(String baselineFile, BufferAllocator allocator, String query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
super(allocator, query, queryType, ordered, approximateEquality, baselineTypeMap, baselineOptionSettingQueries, testOptionSettingQueries,
highPerformanceComparison, expectedNumBatches);
this.baselineFilePath = baselineFile;
}
示例7: JSONTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
JSONTestBuilder(String baselineFile, BufferAllocator allocator, String query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
super(allocator, query, queryType, ordered, approximateEquality, baselineTypeMap, baselineOptionSettingQueries, testOptionSettingQueries,
highPerformanceComparison, expectedNumBatches);
this.baselineFilePath = baselineFile;
this.baselineColumns = new String[] {"*"};
}
示例8: BaselineQueryTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
BaselineQueryTestBuilder(String baselineQuery, UserBitShared.QueryType baselineQueryType, BufferAllocator allocator,
String query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
super(allocator, query, queryType, ordered, approximateEquality, baselineTypeMap, baselineOptionSettingQueries, testOptionSettingQueries,
highPerformanceComparison, expectedNumBatches);
this.baselineQuery = baselineQuery;
this.baselineQueryType = baselineQueryType;
}
示例9: getValidationQueryType
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
protected UserBitShared.QueryType getValidationQueryType() throws Exception {
if (singleExplicitBaselineRecord()) {
return null;
}
if (ordered) {
// If there are no base line records or no baseline query then we will check to make sure that the records are in ascending order
return null;
}
throw new RuntimeException("Must provide some kind of baseline, either a baseline file or another query");
}
示例10: CSVTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
CSVTestBuilder(String baselineFile, TestServices services, Object query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
super(services, query, queryType, ordered, approximateEquality, baselineTypeMap, baselineOptionSettingQueries, testOptionSettingQueries,
highPerformanceComparison, expectedNumBatches);
this.baselineFilePath = baselineFile;
}
示例11: JSONTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
JSONTestBuilder(String baselineFile, TestServices services, Object query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
super(services, query, queryType, ordered, approximateEquality, baselineTypeMap, baselineOptionSettingQueries, testOptionSettingQueries,
highPerformanceComparison, expectedNumBatches);
this.baselineFilePath = baselineFile;
this.baselineColumns = new String[] {"*"};
}
示例12: BaselineQueryTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
BaselineQueryTestBuilder(Object baselineQuery, UserBitShared.QueryType baselineQueryType, TestServices services,
Object query, UserBitShared.QueryType queryType, Boolean ordered,
boolean approximateEquality, Map<SchemaPath, TypeProtos.MajorType> baselineTypeMap,
String baselineOptionSettingQueries, String testOptionSettingQueries, boolean highPerformanceComparison,
int expectedNumBatches) {
super(services, query, queryType, ordered, approximateEquality, baselineTypeMap, baselineOptionSettingQueries, testOptionSettingQueries,
highPerformanceComparison, expectedNumBatches);
this.baselineQuery = baselineQuery;
this.baselineQueryType = baselineQueryType;
}
示例13: getValidationQueryType
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
protected UserBitShared.QueryType getValidationQueryType() throws Exception {
if (singleExplicitBaselineRecord()) {
return null;
}
throw new RuntimeException("Must provide some kind of baseline, either a baseline file or another query");
}
示例14: SchemaTestBuilder
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
SchemaTestBuilder(TestServices services, Object query, UserBitShared.QueryType queryType,
String baselineOptionSettingQueries, String testOptionSettingQueries, List<Pair<SchemaPath, TypeProtos.MajorType>> expectedSchema) {
super(services, query, queryType, false, false, null, baselineOptionSettingQueries, testOptionSettingQueries, false, -1);
expectsEmptyResultSet();
this.expectedSchema = expectedSchema;
}
示例15: getValidationQueryType
import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
@Override
protected UserBitShared.QueryType getValidationQueryType() throws Exception {
return baselineQueryType;
}