Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard ways to load query types in tests #17572

Open
wants to merge 79 commits into
base: master
Choose a base branch
from

Conversation

kgyrtkirk
Copy link
Member

  • biggest change is to use QueryRunnerFactoryModule instead of more complicated ways
  • in the future these things should mostly load normal druid modules as "core" modules ; and test related overrides as overrides
  • right now the PR also includes an upgrade to guice 5.1.0


@Deprecated
public static List<Module> fetchModules(
Function<String, File> tempFolderProducer,

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'tempFolderProducer' is never used.
@Deprecated
public static List<Module> fetchModules(
Function<String, File> tempFolderProducer,
TestGroupByBuffers groupByBuffers

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'groupByBuffers' is never used.
* Deprecated; see: {@link QueryComponentSupplier#configureGuice(DruidInjectorBuilder, List)}
*/
@Deprecated
protected void configureGuice(DruidInjectorBuilder builder)

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'builder' is never used.
@@ -79,11 +77,9 @@
private static final List<InputRow> ROWS1 =
TestDataBuilder.RAW_ROWS1.stream().map(m -> TestDataBuilder.createRow(m, SCHEMA)).collect(Collectors.toList());

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Missing Override annotation

This method overrides [StandardComponentSupplier.getCoreModule](1); it is advisable to add an Override annotation.
@@ -70,11 +71,9 @@
super(tempFolderProducer);
}

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Missing Override annotation

This method overrides [StandardComponentSupplier.getCoreModule](1); it is advisable to add an Override annotation.
@@ -259,11 +260,9 @@
properties.put(SqlModule.PROPERTY_SQL_APPROX_COUNT_DISTINCT_CHOICE, HllSketchApproxCountDistinctSqlAggregator.NAME);
}

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
CalciteTestBase.makeExpression
should be avoided because it has been deprecated.
@@ -90,11 +91,9 @@
super(tempFolderProducer);
}

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Exposing internal representation Note

getUsedSegmentsTimelinesPerDataSource exposes the internal representation stored in field usedSegmentsTimelinesPerDataSource. The value may be modified
after this call to getUsedSegmentsTimelinesPerDataSource
.
@@ -113,11 +114,9 @@
);
}

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Missing Override annotation

This method overrides [StandardComponentSupplier.getCoreModule](1); it is advisable to add an Override annotation.

@Deprecated
public static List<Module> fetchModules(
Function<String, File> tempFolderProducer,

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'tempFolderProducer' is never used.
@Deprecated
public static List<Module> fetchModules(
Function<String, File> tempFolderProducer,
TestGroupByBuffers groupByBuffers

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'groupByBuffers' is never used.
@@ -85,11 +86,9 @@
super(tempFolderProducer);
}

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Missing Override annotation

This method overrides [StandardComponentSupplier.getCoreModule](1); it is advisable to add an Override annotation.
@@ -46,13 +47,11 @@
super(tempFolderProducer);
}

@Override
public void configureGuice(DruidInjectorBuilder builder)
public DruidModule getCoreModule()

Check notice

Code scanning / CodeQL

Missing Override annotation

This method overrides [StandardComponentSupplier.getCoreModule](1); it is advisable to add an Override annotation.
* Deprecated; see: {@link QueryComponentSupplier#configureGuice(DruidInjectorBuilder, List)}
*/
@Deprecated
protected void configureGuice(DruidInjectorBuilder builder)

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'builder' is never used.
LookupSchema lookupSchema, DruidOperatorTable createOperatorTable)
{
final DruidSchemaCatalog rootSchema = QueryFrameworkUtils.createMockRootSchema(
plannerConfig,

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryComponentSupplier.configureJsonMapper
should be avoided because it has been deprecated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants