dremio 开发测试简单说明

目前官方关于如何进行相关开发测试的明确的文档说明,但是我们基于官方提供的测试用例可以基本了解

官方提供的测试用例

sabot/kernel/src/test/java/com/dremio 目录

├── ArrowDsUtil.java
├── BaseDecimalFunctionTests.java
├── BaseTestQuery.java
├── DecimalCompleteTest.java
├── DremioTestWrapper.java
├── ParquetSchemaMerge.java
├── PlanTestBase.java
├── QueryTestUtil.java
├── SingleRowListener.java
├── TestAggNullable.java
├── TestAggregationQueries.java
├── TestAltSortQueries.java
├── TestBugFixes.java
├── TestBuilder.java
├── TestCTASPartitionFilter.java
├── TestCaseSensitivity.java
├── TestCorrelation.java
├── TestDecimalFunctionsInGandivaCodeGen.java
├── TestDecimalFunctionsInGandivaOnlyCodeGen.java
├── TestDecimalFunctionsInJavaCodeGen.java
├── TestDecimalQueries.java
├── TestDecimalSetting.java
├── TestDecimalStreamAgg.java
├── TestDecimalVJoin.java
├── TestDecimalVectorizedAgg.java
├── TestDisabledFunctionality.java
├── TestDropTable.java
├── TestExampleQueries.java
├── TestExplainJson.java
├── TestFilterPastJoin.java
├── TestFrameworkTest.java
├── TestFunctionsQuery.java
├── TestFunctionsWithTypeExpoQueries.java
├── TestGandivaOnlyQueries.java
├── TestImplicitCasting.java
├── TestInList.java
├── TestIndexBasedPruning.java
├── TestIsNotDistinctFromJoin.java
├── TestJoinNullable.java
├── TestMergeFilterPlan.java
├── TestMergingReceiverSpooling.java
├── TestMfsBlockLoader.java
├── TestMixedDecimalFunctionTests.java
├── TestNljPushdown.java
├── TestNotInQueries.java
├── TestOutOfMemoryException.java
├── TestOutOfMemoryOutcome.java
├── TestProjectPushDown.java
├── TestResult.java
├── TestSchemaChange.java
├── TestSelectWithOption.java
├── TestStarQueries.java
├── TestTextJoin.java
├── TestTextWriter.java
├── TestTpchDistributed.java
├── TestTpchDistributedConcurrent.java
├── TestTpchDistributedStreaming.java
├── TestTpchExplain.java
├── TestTpchLimit0.java
├── TestTpchPlanning.java
├── TestTpchSingleMode.java
├── TestTransitiveJoin.java
├── TestTruncateTable.java
├── TestUnionAll.java
├── TestUnionDistinct.java
├── TestVectorizedPartitionSender.java
├── common
├── exec
└── sabot

plugin 测试简单说明

参考自官方的测试demo
需要做的事情,初始化一个dremio catalog 服务(进行插件管理),注册自己开发的插件,进行查询测试(注意测试基类需要继承自BaseTestQuery我们可以利用好多base 的方法,test...)

  • 简单参考
 
public class TestSubPathFileSystemPlugin extends BaseTestQuery {
  @ClassRule
  public static TemporaryFolder testFolder = new TemporaryFolder();
 
  protected static File storageBase;
 
  @Rule
  public TemporarySystemProperties properties = new TemporarySystemProperties();
 
  @Before
  public void before() {
    properties.set(DremioConfig.LEGACY_STORE_VIEWS_ENABLED, "true");
  }
 
  @BeforeClass
  public static void setup() throws Exception {
    testNoResult("alter system set \"%s\" = 1", FileDatasetHandle.DFS_MAX_FILES.getOptionName());
    generateTestData();
    addSubPathDfsPlugin();
  }
 
  @Test
  public void queryValidPath() throws Exception {
    test("SELECT * FROM subPathDfs.\"tblInside.csv\"");
    test("SELECT * FROM subPathDfs.\"dirInside/tbl.csv\"");
  }

maven 依赖包

  • 参考
    注意需要引用dremio kernel 的test 包,同时repo 需要使用dremio 自己的
 
<dependency>
  <groupId>com.dremio.sabot</groupId>
  <artifactId>dremio-sabot-kernel</artifactId>
  <version>${project.version}</version>
  <classifier>tests</classifier>
  <scope>test</scope>
  <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>      
  </exclusions>
</dependency>
 
<repositories>
    <repository>
        <id>tencent-public</id>
        <url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
    </repository>
    <repository>
        <id>dremio-public</id>
        <url>http://maven.dremio.com/public/</url>
    </repository>
    <repository>
        <id>dremio-free</id>
        <url>http://maven.dremio.com/free/</url>
    </repository>
</repositories>

说明

以上是一个简单的说明,实际还需要自己多研究,官方已经提供了好多demo

参考资料

https://github.com/dremio/dremio-oss

posted on   荣锋亮  阅读(238)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-04-10 nomad 0.9 新特性
2019-04-10 goaccess geoip 测试
2018-04-10 elixir 几种安装方式
2018-04-10 一张elixir生产环境部署的图
2017-04-10 基于jquery 的ajax 文件下载
2014-04-10 无法对 数据库'XXXXX' 执行 删除,因为它正用于复制

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示