mirror of https://github.com/apache/druid.git
parent
1063948749
commit
4c722f271f
|
@ -21,13 +21,7 @@ package org.apache.druid.sql.avatica;
|
|||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.ObjectWriter;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter.SerializeExceptFilter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Inject;
|
||||
import org.apache.calcite.avatica.Meta;
|
||||
import org.apache.calcite.rel.type.RelDataType;
|
||||
|
@ -48,7 +42,6 @@ import org.apache.druid.sql.hook.DruidHookDispatcher;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class MSQDruidMeta extends DruidMeta
|
||||
{
|
||||
|
@ -97,26 +90,10 @@ public class MSQDruidMeta extends DruidMeta
|
|||
throw new ISE("Results report not present in the task's report payload");
|
||||
}
|
||||
try {
|
||||
// objectMapper.setexc
|
||||
// objectMapper.wit
|
||||
|
||||
Set<String> ignorableFieldNames = ImmutableSet.of("sqlQueryId", "startTime", "duration");
|
||||
SimpleBeanPropertyFilter simpleFilterProvider = SerializeExceptFilter.serializeAllExcept(ignorableFieldNames);
|
||||
// simpleFilterProvider.serializeAllExcept(ignorableFieldNames);
|
||||
// FilterProvider filters = simpleFilterProvider.addFilter("customerFilter", SimpleBeanPropertyFilter.serializeAllExcept(ignorableFieldNames));
|
||||
|
||||
SerializationFeature f1;
|
||||
|
||||
SimpleFilterProvider ff = new SimpleFilterProvider();
|
||||
ff.addFilter("removeSome",simpleFilterProvider);
|
||||
;
|
||||
ObjectWriter writerWithDefaultPrettyPrinter = objectMapper.copy().setFilterProvider(ff)
|
||||
.writerWithDefaultPrettyPrinter();
|
||||
|
||||
String str = writerWithDefaultPrettyPrinter
|
||||
String str = objectMapper
|
||||
.writerWithDefaultPrettyPrinter()
|
||||
.writeValueAsString(payload.getStages());
|
||||
str = str.replaceAll(taskId, "<taskId>");
|
||||
|
||||
hookDispatcher.dispatch(DruidHook.MSQ_PLAN, str);
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
|
|
|
@ -94,7 +94,7 @@ order by 1;
|
|||
"finalize" : true,
|
||||
"maxParseExceptions" : 0,
|
||||
"plannerStrategy" : "DECOUPLED",
|
||||
"sqlQueryId" : "0d086117-b160-4367-9c73-f2e111ad9c5b",
|
||||
"sqlQueryId" : "1e9ae92b-02e5-4506-be2e-8d89ce1dc77d",
|
||||
"sqlStringifyArrays" : false
|
||||
}
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ order by 1;
|
|||
"partitionCount" : 1,
|
||||
"shuffle" : "globalSort",
|
||||
"output" : "localStorage",
|
||||
"startTime" : "2024-08-05T14:14:37.761Z",
|
||||
"duration" : 628,
|
||||
"startTime" : "2024-07-26T04:26:29.003Z",
|
||||
"duration" : 724,
|
||||
"sort" : true
|
||||
}, {
|
||||
"stageNumber" : 1,
|
||||
|
@ -200,7 +200,7 @@ order by 1;
|
|||
"finalize" : true,
|
||||
"maxParseExceptions" : 0,
|
||||
"plannerStrategy" : "DECOUPLED",
|
||||
"sqlQueryId" : "0d086117-b160-4367-9c73-f2e111ad9c5b",
|
||||
"sqlQueryId" : "1e9ae92b-02e5-4506-be2e-8d89ce1dc77d",
|
||||
"sqlStringifyArrays" : false
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ order by 1;
|
|||
"workerCount" : 1,
|
||||
"partitionCount" : 1,
|
||||
"output" : "localStorage",
|
||||
"startTime" : "2024-08-05T14:14:38.389Z",
|
||||
"startTime" : "2024-07-26T04:26:29.727Z",
|
||||
"duration" : 2
|
||||
} ]
|
||||
!msqPlan
|
||||
|
|
Loading…
Reference in New Issue