import { AGG_DELIMITER , AGG_TYPE , COUNT_PROP_NAME , JOIN_FIELD_NAME_PREFIX } from './constants' ; export function getJoinAggKey ( { aggType , aggFieldName , rightSourceId , } ) { const metricKey = aggType !== AGG_TYPE . COUNT ? `${ aggType }${ AGG_DELIMITER }${ aggFieldName }` : aggType ; return `${ JOIN_FIELD_NAME_PREFIX }${ metricKey }__${ rightSourceId }` ; } export function getSourceAggKey ( { aggType , aggFieldName , } ) { return aggType !== AGG_TYPE . COUNT ? `${ aggType }${ AGG_DELIMITER }${ aggFieldName }` : COUNT_PROP_NAME ; }