Table name starting with a digit causes the code completion to fail
- Dominant language
- Python
- Stars
- 228
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
```
# athenacli aleksei_ds_parity
us-east-1:aleksei_ds_parity> Exception in thread completion_refresh:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/athenacli/completion_refresher.py", line 71, in _bg_refresh
refresher(completer, executor)
File "/usr/local/lib/python3.9/site-packages/athenacli/completion_refresher.py", line 113, in refresh_tablespletions...
completer.extend_columns(executor.table_columns(), kind='tables')
File "/usr/local/lib/python3.9/site-packages/athenacli/completer.py", line 124, in extend_columns
metadata[self.dbname][relname].append(column)
KeyError: '"2a"'
```
Probably doesn't matter - but I am running it against Athena:
```
pip install athenacli
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=...
export AWS_DEFAULT_REGION=us-east-1
export AWS_ATHENA_S3_STAGING_DIR=s3://my-bucket/athena
export AWS_ATHENA_WORK_GROUP=primary
athenacli aleksei_ds_parity
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with the AthenaCLI command and a table named "2a". Read completion_refresher.py, especially refresh_tablespletions, then completer.py around extend_columns and compare its metadata keys with executor.table_columns(). Done means background completion refreshes without a KeyError and columns for digit-starting table names remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100