use of com.xiaomi.linden.thrift.common.ShardRouteParam in project linden by XiaoMi.
the class BQLCompilerAnalyzer method exitRoute_shard_clause.
@Override
public void exitRoute_shard_clause(BQLParser.Route_shard_clauseContext ctx) {
List<ShardRouteParam> shardRouteParams = new ArrayList<>();
for (BQLParser.Route_shard_valueContext route : ctx.route_shard_value()) {
if (route.route_single_shard_value() != null) {
ShardRouteParam shardRouteParam = (ShardRouteParam) valProperty.get(route.route_single_shard_value());
if (shardRouteParam != null) {
shardRouteParams.add(shardRouteParam);
}
} else if (route.route_multi_shard_values() != null) {
List<ShardRouteParam> multiShardRouteParams = (List<ShardRouteParam>) valProperty.get(route.route_multi_shard_values());
if (multiShardRouteParams != null) {
shardRouteParams.addAll(multiShardRouteParams);
}
}
}
valProperty.put(ctx, shardRouteParams);
}
Aggregations