mirror of https://github.com/apache/druid.git
format/etc
This commit is contained in:
parent
a9dcb2da46
commit
e60a200d95
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.druid.sql.avatica;
|
package org.apache.druid.sql.avatica;
|
||||||
//package org.apache.druid.msq.exec;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
@ -55,8 +54,7 @@ public class MSQDruidMeta extends DruidMeta
|
||||||
final ErrorHandler errorHandler,
|
final ErrorHandler errorHandler,
|
||||||
final AuthenticatorMapper authMapper,
|
final AuthenticatorMapper authMapper,
|
||||||
final MSQTestOverlordServiceClient overlordClient,
|
final MSQTestOverlordServiceClient overlordClient,
|
||||||
final ObjectMapper objectMapper
|
final ObjectMapper objectMapper)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
super(sqlStatementFactory, config, errorHandler, authMapper);
|
super(sqlStatementFactory, config, errorHandler, authMapper);
|
||||||
this.overlordClient = overlordClient;
|
this.overlordClient = overlordClient;
|
||||||
|
@ -86,23 +84,17 @@ public class MSQDruidMeta extends DruidMeta
|
||||||
if (resultRows == null) {
|
if (resultRows == null) {
|
||||||
throw new ISE("Results report not present in the task's report payload");
|
throw new ISE("Results report not present in the task's report payload");
|
||||||
}
|
}
|
||||||
// extractedResults.add(
|
|
||||||
// results.withSignatureAndResults(
|
|
||||||
// convertColumnAndTypeToRowSignature(payload.getResults().getSignature()), resultRows
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
try {
|
try {
|
||||||
String str = objectMapper
|
String str = objectMapper
|
||||||
.writerWithDefaultPrettyPrinter()
|
.writerWithDefaultPrettyPrinter()
|
||||||
.writeValueAsString(payload.getStages());
|
.writeValueAsString(payload.getStages());
|
||||||
str=str.replaceAll(taskId, "<taskId>");
|
str = str.replaceAll(taskId, "<taskId>");
|
||||||
DruidHook.dispatch(DruidHook.MSQ_PLAN, str);
|
DruidHook.dispatch(DruidHook.MSQ_PLAN, str);
|
||||||
}
|
}
|
||||||
catch (JsonProcessingException e) {
|
catch (JsonProcessingException e) {
|
||||||
DruidHook.dispatch(DruidHook.MSQ_PLAN, "error happened during json serialization");
|
DruidHook.dispatch(DruidHook.MSQ_PLAN, "error happened during json serialization");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Signature signature = makeSignature(druidStatement, payload.getResults().getSignature());
|
Signature signature = makeSignature(druidStatement, payload.getResults().getSignature());
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Frame firstFrame = Frame.create(0, true, (List<Object>) resultRows);
|
Frame firstFrame = Frame.create(0, true, (List<Object>) resultRows);
|
||||||
|
@ -137,10 +129,11 @@ public class MSQDruidMeta extends DruidMeta
|
||||||
{
|
{
|
||||||
return RowSignatures.toRelDataType(sig, DruidTypeSystem.TYPE_FACTORY);
|
return RowSignatures.toRelDataType(sig, DruidTypeSystem.TYPE_FACTORY);
|
||||||
|
|
||||||
// typeFactory.createStructType(
|
// typeFactory.createStructType(
|
||||||
// signature.stream()
|
// signature.stream()
|
||||||
// .map(columnAndType -> relDataTypeFactory.createJavaType(columnAndType.getType()))
|
// .map(columnAndType ->
|
||||||
// .toArray(RelDataType[]::new));
|
// relDataTypeFactory.createJavaType(columnAndType.getType()))
|
||||||
|
// .toArray(RelDataType[]::new));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue