@Override
    public TDescribeTableResult describeTable(TDescribeTableParams params) throws TException {
        LOG.debug("get desc table request: {}", params);
        TDescribeTableResult result = new TDescribeTableResult();
        List<TColumnDef> columns = Lists.newArrayList();
        result.setColumns(columns);

        // database privs should be checked in analysis phrase
        UserIdentity currentUser = null;
        if (params.isSetCurrent_user_ident()) {
            currentUser = UserIdentity.fromThrift(params.current_user_ident);
        } else {
            currentUser = UserIdentity.createAnalyzedUserIdentWithIp(params.user, params.user_ip);
        }
        long limit = params.isSetLimit() ? params.getLimit() : -1;

        // if user query schema meta such as "select * from information_schema.columns limit 10;",
        // in this case, there is no predicate and only has limit clause,we can call the
        // describe_table interface only once, which can reduce RPC time from BE to FE, and
        // the amount of data. In additional,we need add db_name & table_name values to TColumnDesc.
        if (!params.isSetDb() && StringUtils.isBlank(params.getTable_name())) {
            describeWithoutDbAndTable(currentUser, columns, limit);
            return result;
        }

        String catalogName = null;
        if (params.isSetCatalog_name()) {
            catalogName = params.getCatalog_name();
        }

        MetadataMgr metadataMgr = GlobalStateMgr.getCurrentState().getMetadataMgr();
        Database db = metadataMgr.getDb(catalogName, params.db);

        if (db != null) {
            Locker locker = new Locker();
            try {
                locker.lockDatabase(db, LockType.READ);
                Table table = metadataMgr.getTable(catalogName, params.db, params.table_name);
                if (table == null) {
                    return result;
                }
                try {
                    Authorizer.checkAnyActionOnTableLikeObject(currentUser,
                            null, params.db, table);
                } catch (AccessDeniedException e) {
                    return result;
                }
                setColumnDesc(columns, table, limit, false, params.db, params.table_name);
            } finally {
                locker.unLockDatabase(db, LockType.READ);
            }
        }
        return result;
    }
@Test
    public void testDefaultValueMeta() throws Exception {
        starRocksAssert.withDatabase("test_table").useDatabase("test_table")
                .withTable("CREATE TABLE `test_default_value` (\n" +
                        "  `id` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT \"\",\n" +
                        "  `value` int(11) NULL DEFAULT \"2\" COMMENT \"\"\n" +
                        ") ENGINE=OLAP \n" +
                        "DUPLICATE KEY(`id`, `value`)\n" +
                        "DISTRIBUTED BY RANDOM\n" +
                        "PROPERTIES (\n" +
                        "\"replication_num\" = \"1\",\n" +
                        "\"in_memory\" = \"false\",\n" +
                        "\"enable_persistent_index\" = \"false\",\n" +
                        "\"replicated_storage\" = \"true\",\n" +
                        "\"compression\" = \"LZ4\"\n" +
                        ");");

        ConnectContext ctx = starRocksAssert.getCtx();
        String createUserSql = "create user test2";
        DDLStmtExecutor.execute(UtFrameUtils.parseStmtWithNewParser(createUserSql, ctx), ctx);
        String grantSql = "GRANT SELECT ON TABLE test_table.test_default_value TO USER `test2`@`%`;";
        DDLStmtExecutor.execute(UtFrameUtils.parseStmtWithNewParser(grantSql, ctx), ctx);

        FrontendServiceImpl impl = new FrontendServiceImpl(exeEnv);
        TDescribeTableParams request = new TDescribeTableParams();
        TUserIdentity userIdentity = new TUserIdentity();
        userIdentity.setUsername("test2");
        userIdentity.setHost("%");
        userIdentity.setIs_domain(false);
        request.setCurrent_user_ident(userIdentity);
        TDescribeTableResult response = impl.describeTable(request);
        List<TColumnDef> columnDefList = response.getColumns();
        List<TColumnDef> testDefaultValue = columnDefList.stream()
                .filter(u -> u.getColumnDesc().getTableName().equalsIgnoreCase("test_default_value"))
                .collect(Collectors.toList());
        Assert.assertEquals(2, testDefaultValue.size());
        Assert.assertEquals("CURRENT_TIMESTAMP", testDefaultValue.get(0).getColumnDesc().getColumnDefault());
        Assert.assertEquals("2", testDefaultValue.get(1).getColumnDesc().getColumnDefault());
    }