<commit_before><?php
class myReportsSqlFileMgr
{
	const NO_TEXT_SUFFIX = "no_text";
	const FOR_OBJECTS_SUFFIX = "for_objects";
	const NO_FILTER_SUFFIX = "without_filter";
	
	public static function getSqlFilePath ( $type_str , $flavor_str , $add_search_text , $object_ids, $input_filter )
	{
		$res = self::getSqlFilePathImpl( $type_str , $flavor_str , $add_search_text , $object_ids,  $input_filter );
KalturaLog::log ( __METHOD__. ": [$type_str] [$flavor_str] [$add_search_text] [$object_ids] -> [$res]" );		
		return $res;
	}
	
	private static function getSqlFilePathImpl ( $type_str , $flavor_str , $add_search_text , $object_ids , $input_filter, $recursion_count = 0)
	{		
		$recursion_count++;
		if ( $recursion_count > 5) 
		{
			throw new Exception ("Cannot find config for [$type_str] , [$flavor_str]" ); 
		}
		
		$has_filter = ( $input_filter->keywords != "" || $input_filter->categories != "" || $object_ids);
		
		$config = self::getFileNameMappingConfig( 
			$type_str , 
			$flavor_str , 
			$add_search_text ? "" : "_" . self::NO_TEXT_SUFFIX , 
			$object_ids ? "_" . self::FOR_OBJECTS_SUFFIX : "",
			$has_filter,
			$input_filter->getFilterBy());<commit_msg>qnd: end user level reports - support context aggregation<commit_after><?php
class myReportsSqlFileMgr
{
	const NO_TEXT_SUFFIX = "no_text";
	const FOR_OBJECTS_SUFFIX = "for_objects";
	const NO_FILTER_SUFFIX = "without_filter";
	
	public static function getSqlFilePath ( $type_str , $flavor_str , $add_search_text , $object_ids, $input_filter )
	{
		$res = self::getSqlFilePathImpl( $type_str , $flavor_str , $add_search_text , $object_ids,  $input_filter );
KalturaLog::log ( __METHOD__. ": [$type_str] [$flavor_str] [$add_search_text] [$object_ids] -> [$res]" );		
		return $res;
	}
	
	private static function getSqlFilePathImpl ( $type_str , $flavor_str , $add_search_text , $object_ids , $input_filter, $recursion_count = 0)
	{		
		$recursion_count++;
		if ( $recursion_count > 5) 
		{
			throw new Exception ("Cannot find config for [$type_str] , [$flavor_str]" ); 
		}
		
		$has_filter = ( $input_filter->keywords != "" || $input_filter->categories != "" || $object_ids || $input_filter->getFilterBy() != "");
		
		$config = self::getFileNameMappingConfig( 
			$type_str , 
			$flavor_str , 
			$add_search_text ? "" : "_" . self::NO_TEXT_SUFFIX , 
			$object_ids ? "_" . self::FOR_OBJECTS_SUFFIX : "",
			$has_filter,
			$input_filter->getFilterBy());
{'fraction_non_alphanumeric': 0.15008223684210525, 'fraction_numerical': 0.001644736842105263, 'mean_word_length': 4.806682577565632, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5010193', 'n_tokens_mistral': 973, 'n_tokens_neox': 874, 'n_words': 159}