@Override
    public TStreamLoadPutResult streamLoadPut(TStreamLoadPutRequest request) {
        String clientAddr = getClientAddrAsString();
        LOG.info("receive stream load put request. db:{}, tbl: {}, txn_id: {}, load id: {}, backend: {}",
                request.getDb(), request.getTbl(), request.getTxnId(), DebugUtil.printId(request.getLoadId()),
                clientAddr);
        LOG.debug("stream load put request: {}", request);

        TStreamLoadPutResult result = new TStreamLoadPutResult();
        TStatus status = new TStatus(TStatusCode.OK);
        result.setStatus(status);
        try {
            result.setParams(streamLoadPutImpl(request));
        } catch (LockTimeoutException e) {
            LOG.warn("failed to get stream load plan: {}", e.getMessage());
            status.setStatus_code(TStatusCode.TIMEOUT);
            status.addToError_msgs(e.getMessage());
        } catch (UserException | StarRocksPlannerException e) {
            LOG.warn("failed to get stream load plan: {}", e.getMessage());
            status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
            status.addToError_msgs(e.getMessage());
        } catch (Throwable e) {
            LOG.warn("catch unknown result.", e);
            status.setStatus_code(TStatusCode.INTERNAL_ERROR);
            status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
            return result;
        }
        return result;
    }
@Test
    public void testStreamLoadPutColumnMapException() {
        FrontendServiceImpl impl = new FrontendServiceImpl(exeEnv);
        TStreamLoadPutRequest request = new TStreamLoadPutRequest();
        request.setDb("test");
        request.setTbl("site_access_hour");
        request.setUser("root");
        request.setTxnId(1024);
        request.setColumnSeparator(",");
        request.setSkipHeader(1);
        request.setFileType(TFileType.FILE_STREAM);

        // wrong format of str_to_date()
        request.setColumns("col1,event_day=str_to_date(col1)");

        TStreamLoadPutResult result = impl.streamLoadPut(request);
        TStatus status = result.getStatus();
        request.setFileType(TFileType.FILE_STREAM);
        Assert.assertEquals(TStatusCode.ANALYSIS_ERROR, status.getStatus_code());
        List<String> errMsg = status.getError_msgs();
        Assert.assertEquals(1, errMsg.size());
        Assert.assertEquals(
                "Expr 'str_to_date(`col1`)' analyze error: No matching function with signature: str_to_date(varchar), " +
                        "derived column is 'event_day'",
                errMsg.get(0));
    }