当前位置: 首页>>代码示例>>Java>>正文


Java UserBitShared.QueryType方法代码示例

本文整理汇总了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++;
  }
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:26,代码来源:TestJsonReader.java

示例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;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:19,代码来源:TestBuilder.java

示例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++;
  }
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:26,代码来源:TestJsonReader.java

示例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;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:19,代码来源:TestBuilder.java

示例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;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:10,代码来源:QueryWrapper.java

示例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;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:9,代码来源:TestBuilder.java

示例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[] {"*"};
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:10,代码来源:TestBuilder.java

示例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;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:11,代码来源:TestBuilder.java

示例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");
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:13,代码来源:TestBuilder.java

示例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;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:9,代码来源:TestBuilder.java

示例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[] {"*"};
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:10,代码来源:TestBuilder.java

示例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;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:11,代码来源:TestBuilder.java

示例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");
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:7,代码来源:TestBuilder.java

示例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;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:7,代码来源:TestBuilder.java

示例15: getValidationQueryType

import org.apache.drill.exec.proto.UserBitShared; //导入方法依赖的package包/类
@Override
protected UserBitShared.QueryType getValidationQueryType() throws Exception {
  return baselineQueryType;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:5,代码来源:TestBuilder.java


注:本文中的org.apache.drill.exec.proto.UserBitShared.QueryType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。