mirror of https://github.com/apache/druid.git
make/etc
This commit is contained in:
parent
0811d801fb
commit
b100e982a4
|
@ -153,7 +153,22 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest
|
||||||
return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper);
|
return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
|
||||||
|
// @Override
|
||||||
|
// public void configure(Binder binder)
|
||||||
|
// {
|
||||||
|
// binder.bind(DruidMeta.class).to(MSQDruidMeta.class).in(LazySingleton.class);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@LazySingleton
|
||||||
|
public DruidMeta createMeta(
|
||||||
|
MSQDruidMeta druidMeta)
|
||||||
|
{
|
||||||
|
return druidMeta;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Provides
|
||||||
@LazySingleton
|
@LazySingleton
|
||||||
public DruidMeta createMeta(
|
public DruidMeta createMeta(
|
||||||
final @MultiStageQuery SqlStatementFactory sqlStatementFactory,
|
final @MultiStageQuery SqlStatementFactory sqlStatementFactory,
|
||||||
|
@ -161,7 +176,7 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest
|
||||||
final ErrorHandler errorHandler,
|
final ErrorHandler errorHandler,
|
||||||
final AuthenticatorMapper authMapper)
|
final AuthenticatorMapper authMapper)
|
||||||
{
|
{
|
||||||
return new DruidMeta(sqlStatementFactory, config, errorHandler, authMapper);
|
return new MSQDruidMeta(sqlStatementFactory, config, errorHandler, authMapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.apache.druid.msq.exec;
|
||||||
|
|
||||||
|
import com.google.inject.Inject;
|
||||||
|
import org.apache.druid.msq.guice.MultiStageQuery;
|
||||||
|
import org.apache.druid.server.security.AuthenticatorMapper;
|
||||||
|
import org.apache.druid.sql.SqlStatementFactory;
|
||||||
|
import org.apache.druid.sql.avatica.AbstractDruidJdbcStatement;
|
||||||
|
import org.apache.druid.sql.avatica.AvaticaServerConfig;
|
||||||
|
import org.apache.druid.sql.avatica.DruidMeta;
|
||||||
|
import org.apache.druid.sql.avatica.ErrorHandler;
|
||||||
|
|
||||||
|
public class MSQDruidMeta extends DruidMeta
|
||||||
|
{
|
||||||
|
@Inject
|
||||||
|
public MSQDruidMeta(
|
||||||
|
final @MultiStageQuery SqlStatementFactory sqlStatementFactory,
|
||||||
|
final AvaticaServerConfig config,
|
||||||
|
final ErrorHandler errorHandler,
|
||||||
|
final AuthenticatorMapper authMapper)
|
||||||
|
{
|
||||||
|
super(sqlStatementFactory, config, errorHandler, authMapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ExecuteResult doFetch(AbstractDruidJdbcStatement druidStatement, int maxRows)
|
||||||
|
{
|
||||||
|
return super.doFetch(druidStatement, maxRows);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ order by 1;
|
||||||
+--------------------------------------------+
|
+--------------------------------------------+
|
||||||
| TASK |
|
| TASK |
|
||||||
+--------------------------------------------+
|
+--------------------------------------------+
|
||||||
| query-a0537802-857a-450e-bceb-3c6d1fd142ff |
|
| query-eeb20bee-0a2a-4812-97d9-ae70a9107f80 |
|
||||||
+--------------------------------------------+
|
+--------------------------------------------+
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,7 @@ public class DruidMeta extends MetaImpl
|
||||||
throw errorHandler.sanitize(t);
|
throw errorHandler.sanitize(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ExecuteResult doFetch(AbstractDruidJdbcStatement druidStatement, int maxRows)
|
protected ExecuteResult doFetch(AbstractDruidJdbcStatement druidStatement, int maxRows)
|
||||||
{
|
{
|
||||||
final Signature signature = druidStatement.getSignature();
|
final Signature signature = druidStatement.getSignature();
|
||||||
final Frame firstFrame = druidStatement.nextFrame(
|
final Frame firstFrame = druidStatement.nextFrame(
|
||||||
|
|
Loading…
Reference in New Issue