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

Abnormal function in rename a property when use of Alter property command #8541

Closed
hfereidouni opened this issue Sep 16, 2018 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@hfereidouni
Copy link

hfereidouni commented Sep 16, 2018

OrientDB Version: 3.0.7

Java Version: 8 u181

OS: macOS 10.13.6

Expected behavior

I have tried to rename a property of a class with this command:
alter property bcd.bcdId name bcd.did
I expected the name attribute has been changed because I didn't get any error with this command and it was ok. Also, I have tried the command below on another class property:
alter property bcc.bccId name cid

Actual behavior

But, the property name attribute just had been changed to NULL and also I couldn't drop the property after this... so, I had to drop the classes, it was ok but very painful.

Steps to reproduce

1- create class bcd extends V
2- create property bcd.bcdId long
3- alter property bcd.bcdId name bcd.did

and

1- create class bcc extends V
2- create property bcc.bccId long
3- alter property bcc.bccId name cid

Hey @saeedtabrizi, do you have any idea about this issue?

@hfereidouni hfereidouni changed the title Abnormal function in rename a property when using Alter property command Abnormal function in rename a property when use of Alter property command Sep 16, 2018
@saeedtabrizi
Copy link
Contributor

Hi @hfereidouni
I guess it's a bug in v3.0 query engine of ODB.
I reproduced it and see this actual result same as you said .
@luigidellaquila It seems we need to have more Test case for fix Alter Property regression .

@luigidellaquila
Copy link
Member

Hi guys,

I'm checking it, I'll let you know asap

Thanks

Luigi

@luigidellaquila
Copy link
Member

Hi @hfereidouni @saeedtabrizi

Ok, I got the problem, the SQL executor tries to evaluate the new name as an expression and it returns null.
The following works fine:

alter property bcc.bccId name "cid"

Anyway, I think it makes sense to make it work also without the quotes, so I'm fixing it

Thanks

Luigi

@hfereidouni
Copy link
Author

Thank you @luigidellaquila :)

@saeedtabrizi
Copy link
Contributor

@luigidellaquila Thanks .
It's a super fast bug fixing 🥇
I will update my forked repository to achieve latest updates and fixtures .

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