This is an automated email from the ASF dual-hosted git repository.

yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 27c3ef1ed5 chore: remove unused codes for samples (#20272)
27c3ef1ed5 is described below

commit 27c3ef1ed5d7edb9918305573d9de9b8b5f4fde8
Author: Yongjie Zhao <[email protected]>
AuthorDate: Tue Jun 7 21:54:15 2022 +0800

    chore: remove unused codes for samples (#20272)
---
 UPDATING.md                                         |  1 +
 superset-frontend/src/explore/exploreUtils/index.js | 10 +---------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/UPDATING.md b/UPDATING.md
index 866c2f95c8..2e000eb885 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -27,6 +27,7 @@ assists people when migrating to a new version.
 - [19046](https://github.com/apache/superset/pull/19046): Enables the drag and 
drop interface in Explore control panel by default. Flips 
`ENABLE_EXPLORE_DRAG_AND_DROP` and `ENABLE_DND_WITH_CLICK_UX` feature flags to 
`True`.
 - [18936](https://github.com/apache/superset/pull/18936): Removes legacy 
SIP-15 interim logic/flags—specifically the `SIP_15_ENABLED`, 
`SIP_15_GRACE_PERIOD_END`, `SIP_15_DEFAULT_TIME_RANGE_ENDPOINTS`, and 
`SIP_15_TOAST_MESSAGE` flags. Time range endpoints are no longer configurable 
and strictly adhere to the `[start, end)` paradigm, i.e., inclusive of the 
start and exclusive of the end. Additionally this change removes the now 
obsolete `time_range_endpoints` from the form-data and result [...]
 - [19570](https://github.com/apache/superset/pull/19570): makes 
[sqloxide](https://pypi.org/project/sqloxide/) optional so the SIP-68 migration 
can be run on aarch64. If the migration is taking too long installing sqloxide 
manually should improve the performance.
+- [20170](https://github.com/apache/superset/pull/20170): Introduced a new 
endpoint for getting datasets samples.
 
 ### Breaking Changes
 
diff --git a/superset-frontend/src/explore/exploreUtils/index.js 
b/superset-frontend/src/explore/exploreUtils/index.js
index d5c3d06d5f..127766e7f3 100644
--- a/superset-frontend/src/explore/exploreUtils/index.js
+++ b/superset-frontend/src/explore/exploreUtils/index.js
@@ -26,7 +26,6 @@ import {
   getChartBuildQueryRegistry,
   getChartMetadataRegistry,
 } from '@superset-ui/core';
-import { omit } from 'lodash';
 import { availableDomains } from 'src/utils/hostNamesConfig';
 import { safeStringify } from 'src/utils/safeStringify';
 import { URL_PARAMS } from 'src/constants';
@@ -216,7 +215,7 @@ export const buildV1ChartDataPayload = ({
           ...baseQueryObject,
         },
       ]));
-  const payload = buildQuery(
+  return buildQuery(
     {
       ...formData,
       force,
@@ -230,13 +229,6 @@ export const buildV1ChartDataPayload = ({
       },
     },
   );
-  if (resultType === 'samples') {
-    // remove row limit and offset to fall back to defaults
-    payload.queries = payload.queries.map(query =>
-      omit(query, ['row_limit', 'row_offset']),
-    );
-  }
-  return payload;
 };
 
 export const getLegacyEndpointType = ({ resultType, resultFormat }) =>

Reply via email to