@Override
    public TGetDictQueryParamResponse getDictQueryParam(TGetDictQueryParamRequest request) throws TException {
        Database db = GlobalStateMgr.getCurrentState().getDb(request.getDb_name());
        if (db == null) {
            throw new SemanticException("Database %s is not found", request.getDb_name());
        }
        Table table = db.getTable(request.getTable_name());
        if (table == null) {
            throw new SemanticException("dict table %s is not found", request.getTable_name());
        }
        if (!(table instanceof OlapTable)) {
            throw new SemanticException("dict table type is not OlapTable, type=" + table.getClass());
        }
        OlapTable dictTable = (OlapTable) table;
        TupleDescriptor tupleDescriptor = new TupleDescriptor(TupleId.createGenerator().getNextId());
        IdGenerator<SlotId> slotIdIdGenerator = SlotId.createGenerator();

        for (Column column : dictTable.getBaseSchema()) {
            SlotDescriptor slotDescriptor = new SlotDescriptor(slotIdIdGenerator.getNextId(), tupleDescriptor);
            slotDescriptor.setColumn(column);
            slotDescriptor.setIsMaterialized(true);
            tupleDescriptor.addSlot(slotDescriptor);
        }

        TGetDictQueryParamResponse response = new TGetDictQueryParamResponse();
        response.setSchema(OlapTableSink.createSchema(db.getId(), dictTable, tupleDescriptor));
        try {
            List<Long> allPartitions = dictTable.getAllPartitionIds();
            TOlapTablePartitionParam partitionParam = OlapTableSink.createPartition(
                    db.getId(), dictTable, tupleDescriptor, dictTable.supportedAutomaticPartition(),
                    dictTable.getAutomaticBucketSize(), allPartitions);
            response.setPartition(partitionParam);
            response.setLocation(OlapTableSink.createLocation(dictTable, partitionParam, dictTable.enableReplicatedStorage()));
            response.setNodes_info(GlobalStateMgr.getCurrentState().createNodesInfo(WarehouseManager.DEFAULT_WAREHOUSE_ID,
                    GlobalStateMgr.getCurrentState().getNodeMgr().getClusterInfo()));
        } catch (UserException e) {
            SemanticException semanticException = new SemanticException("build DictQueryParams error in dict_query_expr.");
            semanticException.initCause(e);
            throw semanticException;
        }
        return response;
    }
@Test
    public void testgetDictQueryParam() throws TException {
        FrontendServiceImpl impl = new FrontendServiceImpl(exeEnv);
        TGetDictQueryParamRequest request = new TGetDictQueryParamRequest();
        request.setDb_name("test");
        request.setTable_name("site_access_auto");

        TGetDictQueryParamResponse result = impl.getDictQueryParam(request);

        System.out.println(result);

        Assert.assertNotEquals(0, result.getLocation().getTabletsSize());
    }