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

fix: missing time type #60

Merged
merged 1 commit into from
Apr 30, 2021
Merged

fix: missing time type #60

merged 1 commit into from
Apr 30, 2021

Conversation

maltoze
Copy link
Contributor

@maltoze maltoze commented Apr 27, 2021

Currently, Executing this sql will throw exception.

SELECT CURTIME() AS result
File "<string>", line 1, in <module>
  File "/home/maltoze/repos/superset/venv/lib/python3.7/site-packages/es/baseapi.py", line 37, in wrap
    return f(self, *args, **kwargs)
  File "/home/maltoze/repos/superset/venv/lib/python3.7/site-packages/es/elastic/api.py", line 145, in execute
    self.description = get_description_from_columns(columns)
  File "/home/maltoze/repos/superset/venv/lib/python3.7/site-packages/es/baseapi.py", line 105, in get_description_from_columns
    for column in columns
  File "/home/maltoze/repos/superset/venv/lib/python3.7/site-packages/es/baseapi.py", line 105, in <listcomp>
    for column in columns
  File "/home/maltoze/repos/superset/venv/lib/python3.7/site-packages/es/baseapi.py", line 87, in get_type
    return type_map[data_type.lower()]
KeyError: 'time'

This will fix it.

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #60 (ed94d95) into master (34d5b2c) will not change coverage.
The diff coverage is n/a.

❗ Current head ed94d95 differs from pull request most recent head 67a8023. Consider uploading reports for the commit 67a8023 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master      #60   +/-   ##
=======================================
  Coverage   94.52%   94.52%           
=======================================
  Files          15       15           
  Lines         932      932           
=======================================
  Hits          881      881           
  Misses         51       51           
Flag Coverage Δ
python 94.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
es/baseapi.py 90.25% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34d5b2c...67a8023. Read the comment docs.

@dpgaspar dpgaspar self-requested a review April 30, 2021 13:21
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@dpgaspar dpgaspar merged commit 8ec8bea into preset-io:master Apr 30, 2021
@maltoze maltoze deleted the fix-time-type branch May 6, 2021 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants