creating hook_views_query_alter in d8 is not same as d7, ofcourse.. after many try, i managed to get this one.. hope this helps.. its for different GET parameter ..
function MYMODULE_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
if ( ($view->id() == 'MY_VIEW' && $view->current_display == 'page_1')) {
$allowed_filters = ['language'=>['table'=>'node__field_v_language','condition_field'=>'field_v_language_value','operator'=>'IN'],
'country'=>['table'=>'node__field_v_country','condition_field'=>'field_v_country_value','operator'=>'IN'],
'city'=>['table'=>'node__field_v_locations','condition_field'=>'field_v_locations_target_id','operator'=>'IN'],
'theme'=>['table'=>'node__field_v_themes','condition_field'=>'field_v_themes_target_id','operator'=>'IN'],
'tag'=>['table'=>'node__field_v_tags','condition_field'=>'field_v_tags_target_id','operator'=>'IN'],
'chId'=>['table'=>'node__field_v_ch_id','condition_field'=>'field_v_ch_id_value','operator'=>'IN'],
'publishedBefore'=>['table'=>'node__field_v_published','condition_field'=>'field_v_published_value','operator'=>'>'],
'publishedAfter'=>['table'=>'node__field_v_published','condition_field'=>'field_v_published_value','operator'=>'$record){
$alias = $q.'_als';
$condition_field = $alias.'.'.$record['condition_field'];
$configuration = [
'type' => 'LEFT',
'table' => $record['table'],
'field' => 'entity_id',
'left_table' => 'node_field_data',
'left_field' => 'nid',
'operator' => '=',
];
$join = \Drupal\views\Views::pluginManager('join')
->createInstance('standard', $configuration);
$rel = $query->addRelationship($alias, $join, 'node_field_data');
$query->addTable('node__field_v_language', $rel, $join, $alias);
$query->addWhere('', $condition_field, [$_GET[$q]], $record['operator']);
}
}
}