Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem of SKIP and LIMT with UNWIND #6528

Closed
dhirender-tyagi opened this issue Aug 5, 2016 · 6 comments
Closed

Problem of SKIP and LIMT with UNWIND #6528

dhirender-tyagi opened this issue Aug 5, 2016 · 6 comments
Assignees
Labels

Comments

@dhirender-tyagi
Copy link

Hi,

I am using v2.2.3 of orientdb.

I have problem with UNWIND with skip and limit.

I have query like

"select IN('Com_has_cat').Industry_Name as Industry_name from category_details where status = 1 and IN('Com_has_cat')[0].Industry_Name like '%Automotive%' and category_ids not in [] order by category_name UNWIND Industry_name SKIP 5 LIMIT 5"

It gives me 0 result

But when I remove UNWIND from query

"select IN('Com_has_cat').Industry_Name as Industry_name from category_details where status = 1 and IN('Com_has_cat')[0].Industry_Name like '%Automotive%' and category_ids not in [] order by category_name SKIP 5 LIMIT 5"

It return 5 results.

So can you please let me know this weird behaviour.

@luigidellaquila
Copy link
Member

Hi @dhirender-tyagi

Can you provide a sample dataset to reproduce the problem?

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this Aug 5, 2016
@dhirender-tyagi
Copy link
Author

dhirender-tyagi commented Aug 5, 2016

Hi @luigidellaquila ,

select * from category_details limit 1

{
    "result": [
        {
            "@type": "d",
            "@rid": "#29:7",
            "@version": 4,
            "@class": "Category_details",
            "category_details_id": 8,
            "category_id": 1,
            "category_name": "C. Choudhary",
            "in_Com_has_cat": [
                "#30:7"
            ],
            "in_Ctype_has_cat": [
                "#31:7"
            ],
            "in_Clevel_has_cat": [
                "#32:7"
            ],
            "@fieldTypes": "category_details_id=l,category_id=l,company_id=l,created_date=t,created_by=l,status=l,reviewed_date=t,category_function_id=l,level_id=l,in_Com_has_cat=g,in_Ctype_has_cat=g,in_Clevel_has_cat=g"
        }
    ],
    "notification": "Query executed in 0.043 sec. Returned 1 record(s)"
}

And

select * from company_details limit 1

{
    "result": [
        {
            "@type": "d",
            "@rid": "#24:4",
            "@version": 6,
            "@class": "Company_details",
            "company_id": 5,
            "company_name": "Asha Overseas",
            "is_newStartUp": false,
            "Industry_Name": "Automotive"
            "in_Dir_has_company": [
                "#25:4"
            ],
            "in_City_has_company": [
                "#26:4"
            ],
            "in_Rev_has_company": [
                "#27:3"
            ],
            "in_Strength_has_company": [
                "#28:3"
            ],
            "out_Com_has_cat": [
                "#30:7"
            ],
            "@fieldTypes": "company_id=l,city_id=l,directory_type_id=l,listing_info_id=l,employee_strength=l,created_date=t,created_by=l,updated_date=t,updated_by=l,status=l,reviewed_by=l,sector_id=l,master_entry=l,marketValue=d,netWorth=d,assets=d,sales=d,revenue=d,employee_strength_id=l,revenue_id=l,credit_Rating=l,in_Dir_has_company=g,in_City_has_company=g,in_Rev_has_company=g,in_Strength_has_company=g,out_Com_has_cat=g"
        }
    ],
    "notification": "Query executed in 0.048 sec. Returned 1 record(s)"
}

@luigidellaquila
Copy link
Member

Hi @dhirender-tyagi

reproducing the problem from two query results with a single record each is quite hard for me... any chance to have a full dataset (eg. a db dump) where the problem happens?

Thanks

Luigi

@dhirender-tyagi
Copy link
Author

Hi @luigidellaquila

Sory @luigidellaquila it is not possible for me to give you the dump of db or whole schema. You can try with same datasource but the difference will be links vs edges between two vertices or class and try to get related data with skip and limit.

@nagarajasr
Copy link
Contributor

@dhirender-tyagi please provide adequate information to help us resolve your issue. if the issue cannot be easily reproduced, it becomes extremely hard to triage and identify the fix. I suggest if you need any help with this issue then please provide some test data against which the issue can be reproduced. thanks for your understanding

@luigidellaquila
Copy link
Member

Hi @dhirender-tyagi

Sorry, I have to close this issue as I was not able to reproduce it.
If you have a test case or a dataset to reproduce it, please reopen

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants