Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ private void createContext(Path path, String matcherKey) throws IOException {

Dictionary<String, Object> props = new Hashtable<>();
props.put(BasicContext.REF_NAME_DATA_SOURCE + TARGET_EXT, filterOfMatcherKey(matcherKey));
props.put(BasicContext.REF_NAME_EXPRESSION_COMPILER_FACTORY + TARGET_EXT,
"(component.name=" + PID_EXP_COMP_FAC + ")");
props.put(BasicContext.REF_NAME_EXPRESSION_COMPILER_FACTORY + TARGET_EXT,
"(component.name=" + PID_EXP_COMP_FAC + ")");
props.put(BasicContext.REF_NAME_DIALECT_FACTORY + TARGET_EXT,
"(org.eclipse.daanse.dialect.name=H2)");
props.put(BasicContext.REF_NAME_CATALOG_MAPPING_SUPPLIER + TARGET_EXT, filterOfMatcherKey(matcherKey));
props.put(BasicContext.REF_NAME_MDX_PARSER_PROVIDER + TARGET_EXT, "(component.name=" + PID_PARSER + ")");

Expand Down
4 changes: 3 additions & 1 deletion demo/server/play/xmla.demo.server.jdkhttp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
bnd.identity;id='org.eclipse.daanse.rolap.mapping.verifyer.basic',\
bnd.identity;id='org.eclipse.daanse.sql.guard.api',\
bnd.identity;id='org.eclipse.daanse.sql.guard.jsqltranspiler',\
bnd.identity;id='org.eclipse.daanse.xmla.server.jdk.httpserver'
bnd.identity;id='org.eclipse.daanse.xmla.server.jdk.httpserver',\
bnd.identity;id='org.apache.felix.fileinstall'


# This will help us keep -runbundles sorted
Expand All @@ -62,6 +63,7 @@
json;version='[20250107.0.0,20250107.0.1)',\
org.apache.aries.spifly.dynamic.framework.extension;version='[1.3.7,1.3.8)',\
org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\
org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\
org.apache.felix.metatype;version='[1.2.4,1.2.5)',\
org.apache.felix.scr;version='[2.2.10,2.2.11)',\
org.eclipse.daanse.demo.server.play;version='[0.0.1,0.0.2)',\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,22 @@
import javax.sql.DataSource;

import org.eclipse.daanse.jdbc.db.dialect.api.Dialect;
import org.eclipse.daanse.jdbc.db.dialect.api.DialectResolver;
import org.eclipse.daanse.jdbc.db.dialect.api.DialectFactory;
import org.eclipse.daanse.mdx.parser.api.MdxParserProvider;
import org.eclipse.daanse.olap.api.AggregationFactory;
import org.eclipse.daanse.olap.api.ConfigConstants;
import org.eclipse.daanse.olap.api.ConnectionProps;
import org.eclipse.daanse.olap.api.Context;
import org.eclipse.daanse.olap.api.Evaluator;
import org.eclipse.daanse.olap.api.Statement;
import org.eclipse.daanse.olap.api.calc.compiler.ExpressionCompiler;

import org.eclipse.daanse.olap.api.aggregator.Aggregator;
import org.eclipse.daanse.olap.api.aggregator.CustomAggregatorFactory;
import org.eclipse.daanse.olap.api.calc.compiler.ExpressionCompiler;
import org.eclipse.daanse.olap.api.calc.compiler.ExpressionCompilerFactory;
import org.eclipse.daanse.olap.api.function.FunctionService;
import org.eclipse.daanse.olap.common.ExecuteDurationUtil;
import org.eclipse.daanse.olap.core.LoggingEventBus;
import org.eclipse.daanse.olap.server.ExecutionImpl;
import org.eclipse.daanse.rolap.api.RolapContext;
import org.eclipse.daanse.rolap.aggregator.AvgAggregator;
import org.eclipse.daanse.rolap.aggregator.CountAggregator;
import org.eclipse.daanse.rolap.aggregator.DistinctCountAggregator;
import org.eclipse.daanse.rolap.aggregator.MaxAggregator;
import org.eclipse.daanse.rolap.aggregator.MinAggregator;
import org.eclipse.daanse.rolap.aggregator.SumAggregator;
import org.eclipse.daanse.rolap.aggregator.experimental.NoneAggregator;
import org.eclipse.daanse.rolap.aggregator.experimental.IppAggregator;
import org.eclipse.daanse.rolap.aggregator.experimental.RndAggregator;
import org.eclipse.daanse.rolap.mapping.api.CatalogMappingSupplier;
import org.eclipse.daanse.rolap.mapping.api.model.AccessRoleMapping;
import org.eclipse.daanse.rolap.mapping.api.model.CatalogMapping;
Expand Down Expand Up @@ -77,14 +67,13 @@
import mondrian.rolap.RolapResultShepherd;
import mondrian.rolap.agg.AggregationManager;
import mondrian.rolap.aggregator.AggregationFactoryImpl;
import org.eclipse.daanse.olap.server.ExecutionImpl;

@Component(service = Context.class, scope = ServiceScope.SINGLETON)
public class BasicContext extends AbstractRolapContext implements RolapContext {

public static final String PID = "org.eclipse.daanse.rolap.core.BasicContext";

public static final String REF_NAME_DIALECT_RESOLVER = "dialectResolver";
public static final String REF_NAME_DIALECT_FACTORY = "dialectFactory";
public static final String REF_NAME_DATA_SOURCE = "dataSource";
public static final String REF_NAME_CATALOG_MAPPING_SUPPLIER = "catalogMappingSuppier";
public static final String REF_NAME_ROLAP_CONTEXT_MAPPING_SUPPLIER = "rolapContextMappingSuppliers";
Expand All @@ -99,8 +88,8 @@ public class BasicContext extends AbstractRolapContext implements RolapContext {
@Reference(name = REF_NAME_DATA_SOURCE, target = UnresolvableNamespace.UNRESOLVABLE_FILTER)
private DataSource dataSource = null;

@Reference(name = REF_NAME_DIALECT_RESOLVER)
private DialectResolver dialectResolver = null;
@Reference(name = REF_NAME_DIALECT_FACTORY)
private DialectFactory dialectFactory = null;

@Reference(name = REF_NAME_CATALOG_MAPPING_SUPPLIER, target = UnresolvableNamespace.UNRESOLVABLE_FILTER, cardinality = ReferenceCardinality.MANDATORY)
private CatalogMappingSupplier catalogMappingSupplier;
Expand Down Expand Up @@ -148,7 +137,7 @@ public void activate1() throws Exception {
queryLimitSemaphore = new Semaphore(getConfigValue(ConfigConstants.QUERY_LIMIT, ConfigConstants.QUERY_LIMIT_DEFAULT_VALUE ,Integer.class));

try (Connection connection = dataSource.getConnection()) {
Optional<Dialect> optionalDialect = dialectResolver.resolve(dataSource);
Optional<Dialect> optionalDialect = dialectFactory.tryCreateDialect(connection);
dialect = optionalDialect.orElseThrow(() -> new Exception(ERR_MSG_DIALECT_INIT));
aggregationFactory = new AggregationFactoryImpl(dialect, this.getCustomAggregators());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void serviceExists(
Dictionary<String, Object> props = new Hashtable<>();

props.put(BasicContext.REF_NAME_DATA_SOURCE + TARGET_EXT, "(ds=1)");
props.put(BasicContext.REF_NAME_DIALECT_RESOLVER + TARGET_EXT, "(dr=2)");
props.put(BasicContext.REF_NAME_DIALECT_FACTORY + TARGET_EXT, "(dr=2)");
props.put(BasicContext.REF_NAME_EXPRESSION_COMPILER_FACTORY + TARGET_EXT, "(ecf=1)");
props.put(BasicContext.REF_NAME_CATALOG_MAPPING_SUPPLIER + TARGET_EXT, "(dbmsp=1)");
props.put(BasicContext.REF_NAME_MDX_PARSER_PROVIDER + TARGET_EXT, "(parser=1)");
Expand Down
Loading