ZhaoNiuniu commented on code in PR #8492:
URL: https://github.com/apache/inlong/pull/8492#discussion_r1259641105


##########
inlong-manager/manager-dao/src/main/resources/mappers/AuditEntityMapper.xml:
##########
@@ -38,16 +38,20 @@
     <resultMap id="SumByLogTsResultMap" type="java.util.Map">
         <result column="log_ts" property="logTs" jdbcType="VARCHAR"/>
         <result column="total" property="total" jdbcType="BIGINT"/>
+        <result column="total_delay" property="totalDelay" jdbcType="BIGINT"/>
     </resultMap>
 
     <select id="sumByLogTs" resultMap="SumByLogTsResultMap">
         select date_format(log_ts, #{format, jdbcType=VARCHAR}) as log_ts, 
sum(`count`) as total, sum(`delay`) as total_delay
-        from apache_inlong_audit.audit_data
-        where inlong_group_id = #{groupId,jdbcType=VARCHAR}
-          and inlong_stream_id = #{streamId,jdbcType=VARCHAR}
-          and audit_id = #{auditId,jdbcType=VARCHAR}
-          and log_ts &gt;= #{sDate, jdbcType=VARCHAR}
-          and log_ts &lt; #{eDate, jdbcType=VARCHAR}
+        from (
+            select distinct ip, docker_id, thread_id, sdk_ts, packet_id, 
log_ts, inlong_group_id, inlong_stream_id, audit_id, `count`, `size`, `delay`

Review Comment:
   All audit fields are included here because the requirement is to duplicate 
audit data according to all audit fields. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to