nebulagraph version: v3.2.1
description: when i use GO FROM
or UNION
or custom variables, the value of the custom variable $var1 will changed with whether the statement adds union.
$var1 = (GO FROM '910306020230520104' OVER e_shareholder_invest REVERSELY WHERE properties(edge).con_prop >= 50 AND src(edge) IS NOT NULL YIELD distinct src(edge) AS ids) UNION (GO FROM '910306020230520104' OVER e_shareholder_invest REVERSELY WHERE properties(edge).con_prop >= 50 YIELD distinct src(edge) AS ids_pre | GO FROM $-.ids_pre OVER e_shareholder_invest REVERSELY WHERE properties(edge).con_prop >= 50 YIELD distinct src(edge) AS ids);
$var2 = YIELD $var1.ids AS ids where $var1.ids IS NOT NULL;
$var3 = (GO FROM $var2.ids OVER e_shareholder_invest WHERE properties(edge).con_prop >= 50 AND dst(edge) IS NOT NULL YIELD distinct dst(edge) AS ids_pre | GO FROM $-.ids_pre OVER e_shareholder_invest WHERE properties(edge).con_prop >= 50 YIELD distinct dst(edge) AS ids)
union YIELD $var2.ids AS ids;
$var1 result is right, 3 is correct.
but the query result is incorrect
can you tell me the reason?