shlomi-noach / openarkkit

Automatically exported from code.google.com/p/openarkkit
24 stars 16 forks source link

oak-online-alter-table fails when the alter option is not specified #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the following command (taken from the documentation)
oak-online-alter-table --database=world --table=City
2. Fails with the following error
<type 'exceptions.Exception'> 'NoneType' object has no attribute '__getitem__'

What is the expected output? What do you see instead?
The command is documented to work when you do not specify the alter option, it 
should rebuild the table. The command fails and displays an error.

What version of the product are you using? On what operating system?
Build 196 running on Python 2.7.8 on Windows 7

Please provide any additional information below.
This appears to be a bug introduced in build 195 on line 759
verbose("- Reminder: altering %s.%s: %s..." % (database_name, 
original_table_name, options.alter_statement[0:30]))
If the alter option is not specified then this line causes an error.

A workaround is to specify an empty alter option, so the command from the 
documentation becomes
oak-online-alter-table --database=world --table=City --alter=""

Original issue reported on code.google.com by sno...@emmis.com on 28 Oct 2014 at 9:26