Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE table_12834315_4 (barrel_length VARCHAR, rear_sight VARCHAR, muzzle_device VARCHAR)

### Question ###
Name the barrel length for rear sight a2 for factory compensator

### Accurate SQL ###

SELECT barrel_length FROM table_12834315_4 WHERE rear_sight = "A2" AND muzzle_device = "Factory compensator"