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

FEAT: Add geopandas as output for omniscidb #1858

Merged

Conversation

xmnlab
Copy link
Contributor

@xmnlab xmnlab commented Jun 25, 2019

In this PR:

  • Add geopandas output for omniscidb
  • Add postgresql backend on geospatial tests
  • Add SetSRID to postgresql backend
  • Add geo spatial rules for literal on postgresql backend

@cpcloud cpcloud added this to the Next Feature Release milestone Jun 25, 2019
ibis/mapd/operations.py Outdated Show resolved Hide resolved
@xmnlab
Copy link
Contributor Author

xmnlab commented Jun 25, 2019

@ian-r-rose I am adding new features on postgis implementation. if you have a time, could you take a look into that?

@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@323967f). Click here to learn what that means.
The diff coverage is 80.48%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1858   +/-   ##
=========================================
  Coverage          ?   85.68%           
=========================================
  Files             ?       81           
  Lines             ?    15537           
  Branches          ?     1994           
=========================================
  Hits              ?    13313           
  Misses            ?     1856           
  Partials          ?      368
Impacted Files Coverage Δ
ibis/sql/alchemy.py 92.33% <ø> (ø)
ibis/mapd/operations.py 71.95% <100%> (ø)
ibis/sql/postgres/compiler.py 91.05% <62.5%> (ø)
ibis/mapd/client.py 60.99% <91.3%> (ø)

@xmnlab xmnlab marked this pull request as ready for review June 26, 2019 19:29
@xmnlab xmnlab requested a review from cpcloud June 26, 2019 19:30
@xmnlab
Copy link
Contributor Author

xmnlab commented Jun 26, 2019

@cpcloud it is done for review :) thanks!

ibis/mapd/client.py Outdated Show resolved Hide resolved
ibis/sql/postgres/compiler.py Outdated Show resolved Hide resolved
ibis/sql/postgres/compiler.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch 2 times, most recently from 703e488 to cffc14a Compare July 3, 2019 18:35
@xmnlab xmnlab requested a review from cpcloud July 3, 2019 20:59
Copy link
Contributor Author

@xmnlab xmnlab left a comment

Choose a reason for hiding this comment

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

@cpcloud it is done for a new review! thanks!

ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 9, 2019

@cpcloud when you have time could you review this one? so I can move forward with the remains PR

@cpcloud
Copy link
Member

cpcloud commented Jul 9, 2019

Reviewing now.

ci/impalamgr.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/mapd/client.py Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/mapd/client.py Show resolved Hide resolved
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 9, 2019

thanks @cpcloud for the feedback! I will work on that!

@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch from 5d5e9be to 6194340 Compare July 14, 2019 14:33
Copy link
Contributor Author

@xmnlab xmnlab left a comment

Choose a reason for hiding this comment

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

@cpcloud thanks for the review. I applied the suggestion you made. it is done for a new review!

ci/impalamgr.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
ibis/common/geospatial.py Outdated Show resolved Hide resolved
"""

def to_df(self):
if not isinstance(self.cursor, Cursor):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

def to_df(self):
if not isinstance(self.cursor, Cursor):
if self.cursor is None:
return geopandas.GeoDataFrameDataFrame([])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for catch that up!

ibis/mapd/client.py Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
ibis/tests/all/test_geospatial.py Outdated Show resolved Hide resolved
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 19, 2019

@cpcloud, when you have time, could you review again this PR? Thanks!

@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch from 6194340 to 95ec563 Compare July 23, 2019 21:03
@xmnlab xmnlab requested a review from cpcloud July 23, 2019 21:03
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 23, 2019

FAILED ibis/tests/all/test_temporal.py::test_timestamp_truncate[Spark-ms] - A...
FAILED ibis/tests/all/test_temporal.py::test_timestamp_truncate[Spark-us] - A...
FAILED ibis/tests/all/test_temporal.py::test_timestamp_truncate[Spark-ns] - A...
FAILED ibis/tests/all/test_temporal.py::test_date_truncate[Spark-M] - Attribu...
FAILED ibis/tests/all/test_temporal.py::test_date_truncate[Spark-D] - Attribu...

Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

LGTM! Merging! Thanks @xmnlab

@cpcloud
Copy link
Member

cpcloud commented Jul 24, 2019

Actually @xmnlab Can you rebase on top of master to pick up the fix from #1893

@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch from 95ec563 to 263255c Compare July 25, 2019 17:30
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 25, 2019

@cpcloud rebase done! but it seems it is raising some errors.

@cpcloud
Copy link
Member

cpcloud commented Jul 25, 2019

@xmnlab Can you rebase and push again to pick up fixes and resolve the conflicts?

@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch from 263255c to e5995a3 Compare July 26, 2019 01:57
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 26, 2019

FAILED ibis/tests/all/test_temporal.py::test_timestamp_truncate[Spark-ms] - A...
FAILED ibis/tests/all/test_temporal.py::test_timestamp_truncate[Spark-us] - A...
FAILED ibis/tests/all/test_temporal.py::test_timestamp_truncate[Spark-ns] - A...
FAILED ibis/tests/all/test_temporal.py::test_date_truncate[Spark-M] - Attribu...
FAILED ibis/tests/all/test_temporal.py::test_date_truncate[Spark-D] - Attribu...
= 5 failed, 6826 passed, 1039 skipped, 564 xfailed, 44 warnings in 612.67 seconds =

@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 27, 2019

@cpcloud do you have any idea about these errors?

@cpcloud
Copy link
Member

cpcloud commented Jul 29, 2019

@xmnlab Looking now. Looks like there's a conflict again here, sorry about that. Can you fix up and push again?

@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch from 440b339 to 59d2d2c Compare July 29, 2019 16:19
@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 29, 2019

rebased! :)

@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 29, 2019

it seems the errors related to test_temporal and spark still occurs

@cpcloud
Copy link
Member

cpcloud commented Jul 29, 2019

@xmnlab We've merged some code in the meantime that uses the old version of common.py so you need to change the import ibis.common as com to import ibis.common.exception as com to fix those errors.

@cpcloud
Copy link
Member

cpcloud commented Jul 29, 2019

After that, this is good to merge.

@xmnlab
Copy link
Contributor Author

xmnlab commented Jul 29, 2019

thanks @cpcloud I didn't realize that the problem could be in new files.

@xmnlab
Copy link
Contributor Author

xmnlab commented Aug 1, 2019

ERROR at setup of test_compile ________________________
[gw1] linux -- Python 3.7.3 /opt/conda/envs/ibis-env/bin/python

data_directory = PosixPath('/tmp/ibis-testing-data')

    @pytest.fixture(scope='session')
    def client(data_directory):
        pytest.importorskip('pyspark')
>       return get_spark_testing_client(data_directory)

ibis/spark/tests/conftest.py:9: 

@xmnlab xmnlab force-pushed the add-omniscidb-geopandas-output branch from 560d677 to 0088881 Compare August 1, 2019 15:58
@xmnlab
Copy link
Contributor Author

xmnlab commented Aug 1, 2019

@cpcloud it is done for a new review! thanks!

Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

LGTM, merging!

@cpcloud cpcloud merged commit b3d0400 into ibis-project:master Aug 2, 2019
@cpcloud cpcloud modified the milestones: Next Feature Release, Next Major Release Aug 26, 2019
@xmnlab xmnlab deleted the add-omniscidb-geopandas-output branch September 27, 2019 21:41
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.

2 participants