You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jfrag1 (via GitHub)" <gi...@apache.org> on 2023/01/27 04:03:09 UTC
[GitHub] [superset] jfrag1 opened a new pull request, #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
jfrag1 opened a new pull request, #22882:
URL: https://github.com/apache/superset/pull/22882
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Deprecates `/superset/filter/<datasource_type>/<datasource_id>/<column_name>/` endpoint
Creates a new, more REST-ful endpoint to replace it
* `/api/v1/datasource/<datasource_type>/<datasource_id>/column/<column_name>/values/`
Other improvements include better test coverage, better error handling, and an openapi spec
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] dpgaspar commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1088766143
##########
superset/datasource/api.py:
##########
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import logging
+
+from flask_appbuilder.api import BaseApi, expose, protect, safe
+
+from superset import app, db, event_logger
+from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP
+from superset.dao.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
+from superset.datasource.dao import DatasourceDAO
+from superset.datasource.schemas import GetColumnValuesResponseSchema
+from superset.exceptions import SupersetSecurityException
+from superset.superset_typing import FlaskResponse
+from superset.utils.core import apply_max_row_limit, DatasourceType
+
+logger = logging.getLogger(__name__)
+
+
+class DatasourceRestApi(BaseApi):
+ include_route_methods = {"get_column_values"}
Review Comment:
we don't need this on this case
##########
superset/datasource/api.py:
##########
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import logging
+
+from flask_appbuilder.api import BaseApi, expose, protect, safe
+
+from superset import app, db, event_logger
+from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP
+from superset.dao.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
+from superset.datasource.dao import DatasourceDAO
+from superset.datasource.schemas import GetColumnValuesResponseSchema
+from superset.exceptions import SupersetSecurityException
+from superset.superset_typing import FlaskResponse
+from superset.utils.core import apply_max_row_limit, DatasourceType
+
+logger = logging.getLogger(__name__)
+
+
+class DatasourceRestApi(BaseApi):
+ include_route_methods = {"get_column_values"}
+ method_permission_name = MODEL_API_RW_METHOD_PERMISSION_MAP
+ allow_browser_login = True
+ class_permission_name = "Datasource"
+ resource_name = "datasource"
+ openapi_spec_tag = "Datasources"
+ openapi_spec_component_schemas = (GetColumnValuesResponseSchema,)
+
+ @expose(
+ "/<datasource_type>/<int:datasource_id>/column/<column_name>/values/",
+ methods=["GET"],
+ )
+ @protect()
+ @safe
+ @event_logger.log_this_with_context(
+ action=lambda self, *args, **kwargs: f"{self.__class__.__name__}"
+ f".get_column_values",
+ log_to_statsd=False,
+ )
+ def get_column_values(
+ self, datasource_type: str, datasource_id: int, column_name: str
+ ) -> FlaskResponse:
+ """Get possible values for a datasource column
+ ---
+ get:
+ summary: Get possible values for a datasource column
+ parameters:
+ - in: path
+ schema:
+ type: string
+ name: datasource_type
+ description: The type of datasource
+ - in: path
+ schema:
+ type: integer
+ name: datasource_id
+ description: The id of the datasource
+ - in: path
+ schema:
+ type: string
+ name: column_name
+ description: The name of the column to get values for
+ responses:
+ 200:
+ description: A List of distinct values for the column
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GetColumnValuesResponseSchema"
Review Comment:
given the restriction to identify a list of any type values, let's just declared the spec here, user:
``` yaml
schema:
type: object
properties:
result:
type: array
items:
oneOf:
- type: string
- type: integer
- type: number
- type: boolean
- type: object
```
##########
tests/integration_tests/datasource/api_tests.py:
##########
@@ -0,0 +1,137 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import json
+from unittest.mock import Mock, patch
+
+import pytest
+
+from superset import db, security_manager
+from superset.connectors.sqla.models import SqlaTable
+from superset.dao.exceptions import DatasourceTypeNotSupportedError
+from tests.integration_tests.base_tests import SupersetTestCase
+
+
+class TestDatasourceApi(SupersetTestCase):
+ def get_virtual_dataset(self):
+ return (
+ db.session.query(SqlaTable)
+ .filter(SqlaTable.table_name == "virtual_dataset")
+ .one()
+ )
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_ints(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col1/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in range(10):
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_strs(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col2/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_floats(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col3/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_nulls(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col4/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ self.assertEqual(response["result"], [None])
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_invalid_datasource_type(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(
+ f"api/v1/datasource/not_table/{table.id}/column/col1/values/"
+ )
+ self.assertEqual(rv.status_code, 400)
+ response = json.loads(rv.data.decode("utf-8"))
+ self.assertEqual(response["message"], "Invalid datasource type: not_table")
+
+ @patch("superset.datasource.api.DatasourceDAO.get_datasource")
+ def test_get_column_values_datasource_type_not_supported(self, get_datasource_mock):
+ get_datasource_mock.side_effect = DatasourceTypeNotSupportedError
+ self.login(username="admin")
+ rv = self.client.get("api/v1/datasource/table/1/column/col1/values/")
Review Comment:
would sending `api/v1/datasource/bogus_type/1/column/col1/values/` result in the same?
##########
tests/integration_tests/datasource/api_tests.py:
##########
@@ -0,0 +1,137 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import json
+from unittest.mock import Mock, patch
+
+import pytest
+
+from superset import db, security_manager
+from superset.connectors.sqla.models import SqlaTable
+from superset.dao.exceptions import DatasourceTypeNotSupportedError
+from tests.integration_tests.base_tests import SupersetTestCase
+
+
+class TestDatasourceApi(SupersetTestCase):
+ def get_virtual_dataset(self):
+ return (
+ db.session.query(SqlaTable)
+ .filter(SqlaTable.table_name == "virtual_dataset")
+ .one()
+ )
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_ints(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col1/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in range(10):
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_strs(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col2/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_floats(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col3/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_nulls(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col4/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ self.assertEqual(response["result"], [None])
Review Comment:
nit: all the above tests could be DRYer if we use `@pytest.mark.parametrize` (optional)
##########
superset/datasource/schemas.py:
##########
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marshmallow import fields, Schema
+
+
+class GetColumnValuesResponseSchema(Schema):
+ result = fields.List(
+ fields.Raw(description="Can be any type, not just string"),
Review Comment:
Let's just not use a marshmallow schema on this case, we don't use it to serialise data anyway
##########
superset/datasource/api.py:
##########
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import logging
+
+from flask_appbuilder.api import BaseApi, expose, protect, safe
+
+from superset import app, db, event_logger
+from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP
+from superset.dao.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
+from superset.datasource.dao import DatasourceDAO
+from superset.datasource.schemas import GetColumnValuesResponseSchema
+from superset.exceptions import SupersetSecurityException
+from superset.superset_typing import FlaskResponse
+from superset.utils.core import apply_max_row_limit, DatasourceType
+
+logger = logging.getLogger(__name__)
+
+
+class DatasourceRestApi(BaseApi):
+ include_route_methods = {"get_column_values"}
+ method_permission_name = MODEL_API_RW_METHOD_PERMISSION_MAP
Review Comment:
we don't need this on this case
##########
tests/integration_tests/core_tests.py:
##########
@@ -325,21 +325,13 @@ def test_save_slice(self):
@pytest.mark.usefixtures("load_energy_table_with_slice")
def test_filter_endpoint(self):
self.login(username="admin")
- slice_name = "Energy Sankey"
- slice_id = self.get_slice(slice_name, db.session).id
- db.session.commit()
tbl_id = self.table_ids.get("energy_usage")
table = db.session.query(SqlaTable).filter(SqlaTable.id == tbl_id)
table.filter_select_enabled = True
- url = (
Review Comment:
remains of a broken compatibility :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 closed pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 closed pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
URL: https://github.com/apache/superset/pull/22882
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1088593935
##########
superset/datasource/schemas.py:
##########
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marshmallow import fields, Schema
+
+
+class GetColumnValuesResponseSchema(Schema):
+ result = fields.List(
+ fields.Raw(description="Can be any type, not just string"),
Review Comment:
spent ~15 minutes trying to figure out how to display an "any" type in swagger to no avail. This shows up as string in the spec, so adding the description for clarification
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1089117436
##########
tests/integration_tests/datasource/api_tests.py:
##########
@@ -0,0 +1,137 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import json
+from unittest.mock import Mock, patch
+
+import pytest
+
+from superset import db, security_manager
+from superset.connectors.sqla.models import SqlaTable
+from superset.dao.exceptions import DatasourceTypeNotSupportedError
+from tests.integration_tests.base_tests import SupersetTestCase
+
+
+class TestDatasourceApi(SupersetTestCase):
+ def get_virtual_dataset(self):
+ return (
+ db.session.query(SqlaTable)
+ .filter(SqlaTable.table_name == "virtual_dataset")
+ .one()
+ )
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_ints(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col1/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in range(10):
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_strs(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col2/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_floats(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col3/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_nulls(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col4/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ self.assertEqual(response["result"], [None])
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_invalid_datasource_type(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(
+ f"api/v1/datasource/not_table/{table.id}/column/col1/values/"
+ )
+ self.assertEqual(rv.status_code, 400)
+ response = json.loads(rv.data.decode("utf-8"))
+ self.assertEqual(response["message"], "Invalid datasource type: not_table")
+
+ @patch("superset.datasource.api.DatasourceDAO.get_datasource")
+ def test_get_column_values_datasource_type_not_supported(self, get_datasource_mock):
+ get_datasource_mock.side_effect = DatasourceTypeNotSupportedError
+ self.login(username="admin")
+ rv = self.client.get("api/v1/datasource/table/1/column/col1/values/")
Review Comment:
No, that would raise a `ValueError` on the endpoint, that case is covered by the `test_get_column_values_invalid_datasource_type` above this one. This exception can be raised if the type is in the `DatasourceType` enum, but not supported by `get_datasource`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1089113607
##########
tests/integration_tests/core_tests.py:
##########
@@ -325,21 +325,13 @@ def test_save_slice(self):
@pytest.mark.usefixtures("load_energy_table_with_slice")
def test_filter_endpoint(self):
self.login(username="admin")
- slice_name = "Energy Sankey"
- slice_id = self.get_slice(slice_name, db.session).id
- db.session.commit()
tbl_id = self.table_ids.get("energy_usage")
table = db.session.query(SqlaTable).filter(SqlaTable.id == tbl_id)
table.filter_select_enabled = True
- url = (
Review Comment:
yeah, saw this and was like 🤨
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1089135540
##########
tests/integration_tests/datasource/api_tests.py:
##########
@@ -0,0 +1,137 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import json
+from unittest.mock import Mock, patch
+
+import pytest
+
+from superset import db, security_manager
+from superset.connectors.sqla.models import SqlaTable
+from superset.dao.exceptions import DatasourceTypeNotSupportedError
+from tests.integration_tests.base_tests import SupersetTestCase
+
+
+class TestDatasourceApi(SupersetTestCase):
+ def get_virtual_dataset(self):
+ return (
+ db.session.query(SqlaTable)
+ .filter(SqlaTable.table_name == "virtual_dataset")
+ .one()
+ )
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_ints(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col1/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in range(10):
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_strs(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col2/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_floats(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col3/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ for val in [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]:
+ assert val in response["result"]
+
+ @pytest.mark.usefixtures("app_context", "virtual_dataset")
+ def test_get_column_values_nulls(self):
+ self.login(username="admin")
+ table = self.get_virtual_dataset()
+ rv = self.client.get(f"api/v1/datasource/table/{table.id}/column/col4/values/")
+ self.assertEqual(rv.status_code, 200)
+ response = json.loads(rv.data.decode("utf-8"))
+ self.assertEqual(response["result"], [None])
Review Comment:
Hadn't used that before, pretty neat. However, I couldn't get it to play nice with it being a method on a class/using `self`. I checked, and all the other tests in the codebase using that are standalone functions. The duplication isn't too bad here, so opting to just leave as-is
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1089093926
##########
superset/datasource/api.py:
##########
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import logging
+
+from flask_appbuilder.api import BaseApi, expose, protect, safe
+
+from superset import app, db, event_logger
+from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP
+from superset.dao.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
+from superset.datasource.dao import DatasourceDAO
+from superset.datasource.schemas import GetColumnValuesResponseSchema
+from superset.exceptions import SupersetSecurityException
+from superset.superset_typing import FlaskResponse
+from superset.utils.core import apply_max_row_limit, DatasourceType
+
+logger = logging.getLogger(__name__)
+
+
+class DatasourceRestApi(BaseApi):
+ include_route_methods = {"get_column_values"}
Review Comment:
will rebase this one onto master once that one's merged
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 closed pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 closed pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
URL: https://github.com/apache/superset/pull/22882
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] dpgaspar merged pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar merged PR #22882:
URL: https://github.com/apache/superset/pull/22882
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by codecov.
codecov[bot] commented on PR #22882:
URL: https://github.com/apache/superset/pull/22882#issuecomment-1405993775
# [Codecov](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#22882](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f0c9ecd) into [master](https://codecov.io/gh/apache/superset/commit/02e5dcbbf285e15b71c60b3aac1e120b1b5ada1b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02e5dcb) will **decrease** coverage by `11.52%`.
> The diff coverage is `57.77%`.
```diff
@@ Coverage Diff @@
## master #22882 +/- ##
===========================================
- Coverage 67.31% 55.80% -11.52%
===========================================
Files 1879 1873 -6
Lines 72093 71913 -180
Branches 7897 7897
===========================================
- Hits 48530 40131 -8399
- Misses 21535 29754 +8219
Partials 2028 2028
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `52.44% <60.46%> (-0.10%)` | :arrow_down: |
| python | `57.93% <60.46%> (-24.01%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `51.54% <58.13%> (-0.10%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...l/AdhocFilterEditPopoverSimpleTabContent/index.tsx](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXJTaW1wbGVUYWJDb250ZW50L2luZGV4LnRzeA==) | `62.73% <0.00%> (ø)` | |
| [superset/datasource/api.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNvdXJjZS9hcGkucHk=) | `56.41% <56.41%> (ø)` | |
| [superset/initialization/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvaW5pdGlhbGl6YXRpb24vX19pbml0X18ucHk=) | `91.80% <100.00%> (ø)` | |
| [superset/security/manager.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `62.29% <100.00%> (-33.48%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `37.64% <100.00%> (-37.48%)` | :arrow_down: |
| [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset/tags/core.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdGFncy9jb3JlLnB5) | `4.54% <0.00%> (-95.46%)` | :arrow_down: |
| [superset/key\_value/commands/update.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
| [superset/key\_value/commands/delete.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZS5weQ==) | `0.00% <0.00%> (-87.88%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| ... and [305 more](https://codecov.io/gh/apache/superset/pull/22882?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] dpgaspar commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1089051753
##########
superset/datasource/api.py:
##########
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import logging
+
+from flask_appbuilder.api import BaseApi, expose, protect, safe
+
+from superset import app, db, event_logger
+from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP
+from superset.dao.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
+from superset.datasource.dao import DatasourceDAO
+from superset.datasource.schemas import GetColumnValuesResponseSchema
+from superset.exceptions import SupersetSecurityException
+from superset.superset_typing import FlaskResponse
+from superset.utils.core import apply_max_row_limit, DatasourceType
+
+logger = logging.getLogger(__name__)
+
+
+class DatasourceRestApi(BaseApi):
+ include_route_methods = {"get_column_values"}
Review Comment:
I'm finishing up this one: https://github.com/apache/superset/pull/22887 where I'm moving `BaseApi` to a new `BaseSupersetApi`, so now we can include statsd metrics to these endpoints
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on PR #22882:
URL: https://github.com/apache/superset/pull/22882#issuecomment-1406608236
> Hi! Should we use `dataset` name instead of `datasource` in the new v1 API?
Hi there! I think it makes sense to have a `/datasource` blueprint/namespace in the v1 API since datasets are a type of datasource, but there can be other types as well.
There are several "datasource APIs" in [this file](https://github.com/apache/superset/blob/master/superset/views/datasource/views.py) that I think can be moved here as well for 3.0.
It is somewhat confusing, but I think it would be more confusing to put all these under `/dataset`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] EugeneTorap commented on pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "EugeneTorap (via GitHub)" <gi...@apache.org>.
EugeneTorap commented on PR #22882:
URL: https://github.com/apache/superset/pull/22882#issuecomment-1406266098
Hi! Should we use `dataset` name instead of `datasource` in the new v1 API?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jfrag1 commented on a diff in pull request #22882: chore: deprecate /superset/filter/... endpoint, migrate to apiv1
Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #22882:
URL: https://github.com/apache/superset/pull/22882#discussion_r1089118251
##########
superset/datasource/schemas.py:
##########
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marshmallow import fields, Schema
+
+
+class GetColumnValuesResponseSchema(Schema):
+ result = fields.List(
+ fields.Raw(description="Can be any type, not just string"),
Review Comment:
removed and replaced with your suggestion
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org