Create expand_direction.sql

new expand direction function