Wrong Result In Match

Hi

  • I have a question with match,geting wrong result

  • Maven

       <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-jdbc</artifactId>
            <version>3.0.27</version>
        </dependency>

        <dependency>
                <groupId>com.orientechnologies</groupId>
                <artifactId>orientdb-gremlin</artifactId>
                <version>3.0.18</version>
        </dependency>
  • Server
        orientdb-tp3-3.0.29
  • First SQL
    First , I execute the SQL like this:
MATCH {class: Instance652, as:v_gusuoshijian_43,where:(label  = 'v_gusuoshijian_43')}.bothE("e_canyuzhe_73"){as:e_canyuzhe_73}.bothV(){as:v_renyuan_52,where:(label = 'v_renyuan_52' and p_xingming_395 = '感染者2号')},
{as:v_qu_xian_43,where:(label = 'v_qu_xian_43')}.bothE("e_suoshushi_70"){as:e_suoshushi_70}.bothV(){as:v_shi_60,where:(label =  'v_shi_60')},
{as:v_didian_45,where:(label = 'v_didian_45')}.bothE("e_suoshushi_69"){as:e_suoshushi_69}.bothV(){as:v_shi_60},
{as:v_didian_45}.bothE("e_fashengdi_35"){as:e_fashengdi_35}.bothV(){as:v_gusuoshijian_43},
{as:v_yidongshijian_43,where:(label = 'v_yidongshijian_43')}.bothE("e_qishidi_35","e_mudedi_35"){as:e_mudedi_35}.bothV(){as:v_didian_45},
{as:v_renyuan_52}.bothE("e_canyuzhe_72"){as:e_canyuzhe_72}.bothV(){as:v_yidongshijian_43},
{as:v_sheng_53,where:(label = 'v_sheng_53')}.bothE("e_suoshusheng_35"){as:e_suoshusheng_35}.bothV(){as:v_shi_60},
{as:v_qu_xian_43}.bothE("e_suoshuqu_xian_35"){as:e_suoshuqu_xian_35}.bothV(){as:v_didian_45} 
return distinct e_canyuzhe_73,e_suoshushi_70,e_suoshushi_69,e_fashengdi_35,e_mudedi_35,e_canyuzhe_72,e_suoshusheng_35 limit 100

And the result is right , then I changed the SQL like this:

  • Second SQL
MATCH {class: Instance652, as:v_gusuoshijian_43,where:(label  = 'v_gusuoshijian_43')}.bothE("e_canyuzhe_73"){as:e_canyuzhe_73}.bothV(){as:v_renyuan_52,where:(label = 'v_renyuan_52' and p_xingming_395 = '感染者2号')},
{as:v_qu_xian_43,where:(label = 'v_qu_xian_43')}.bothE("e_suoshushi_70"){as:e_suoshushi_70}.bothV(){as:v_shi_60,where:(label =  'v_shi_60')},
{as:v_didian_45,where:(label = 'v_didian_45')}.bothE("e_suoshushi_69"){as:e_suoshushi_69}.bothV(){as:v_shi_60},
{as:v_didian_45}.bothE("e_fashengdi_35"){as:e_fashengdi_35}.bothV(){as:v_gusuoshijian_43},
{as:v_yidongshijian_43,where:(label = 'v_yidongshijian_43')}.bothE("e_qishidi_35","e_mudedi_35"){as:e_mudedi_35}.bothV(){as:v_didian_45},
{as:v_renyuan_52}.bothE("e_canyuzhe_72"){as:e_canyuzhe_72}.bothV(){as:v_yidongshijian_43},
{as:v_qu_xian_43}.bothE("e_suoshuqu_xian_35"){as:e_suoshuqu_xian_35}.bothV(){as:v_didian_45} 
return distinct e_canyuzhe_73,e_suoshushi_70,e_suoshushi_69,e_fashengdi_35,e_mudedi_35,e_canyuzhe_72,e_suoshuqu_xian_35 limit 100
  • Different
    Difference with the first SQL is the second SQL don`t have this,and the result of this SQL should be something in red box of First graph ,
{as:v_sheng_53,where:(label = 'v_sheng_53')}.bothE("e_suoshusheng_35"){as:e_suoshusheng_35}.bothV(){as:v_shi_60},

SomeBody help!

Thanks

52HZ