/**
  * @param \Magento\Framework\DB\Select $select
  * @param string $table
  * @param string $type
  * @return \Magento\Framework\DB\Select
  */
 protected function _addLoadAttributesSelectValues($select, $table, $type)
 {
     $storeId = $this->getStoreId();
     if ($storeId) {
         $connection = $this->getConnection();
         $valueExpr = $connection->getCheckSql('t_s.value_id IS NULL', 't_d.value', 't_s.value');
         $select->columns(['default_value' => 't_d.value', 'store_value' => 't_s.value', 'value' => $valueExpr]);
     } else {
         $select = parent::_addLoadAttributesSelectValues($select, $table, $type);
     }
     return $select;
 }