Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ hive = [
impala = ["impyla>0.16.2, <0.17"]
kusto = ["sqlalchemy-kusto>=3.0.0, <4"]
kylin = ["kylinpy>=2.8.1, <2.9"]
motherduck = ["duckdb==0.10.2", "duckdb-engine>=0.12.1, <0.13"]
mssql = ["pymssql>=2.2.8, <3"]
# motherduck is an alias for duckdb - MotherDuck works via the duckdb driver
motherduck = ["apache-superset[duckdb]"]
mysql = ["mysqlclient>=2.1.0, <3"]
ocient = [
"sqlalchemy-ocient>=1.0.0",
Expand Down
41 changes: 24 additions & 17 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@
"js-yaml-loader": "^1.2.2",
"json-bigint": "^1.0.0",
"json-stringify-pretty-compact": "^2.0.0",
"lodash": "^4.17.21",
"mapbox-gl": "^3.18.0",
"lodash": "^4.17.23",
"mapbox-gl": "^3.18.1",
"markdown-to-jsx": "^9.6.0",
"match-sorter": "^6.3.4",
"memoize-one": "^5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/packages/superset-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"install": "^0.13.0",
"npm": "^11.7.0",
"npm": "^11.8.0",
"typescript": "^5.0.0",
"@emotion/styled": "^11.14.1",
"@types/lodash": "^4.17.23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@apache-superset/core": "*",
"@react-icons/all-files": "^4.1.0",
"@types/react": "*",
"lodash": "^4.17.21"
"lodash": "^4.17.23"
},
"peerDependencies": {
"@ant-design/icons": "^5.2.6",
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/packages/superset-ui-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"fetch-retry": "^6.0.0",
"handlebars": "^4.7.8",
"jed": "^1.1.1",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"math-expression-evaluator": "^2.0.7",
"pretty-ms": "^9.3.0",
"re-resizable": "^6.11.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
*/
import { Pagination as AntdPagination } from 'antd';
import type { PaginationProps as AntdPaginationProps } from 'antd';

export type PaginationProps = AntdPaginationProps;

export const Pagination = AntdPagination;
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ export { Loading, type LoadingProps } from './Loading';

export { Progress, type ProgressProps } from './Progress';

export { Pagination, type PaginationProps } from './Pagination';

export { Skeleton, type SkeletonProps } from './Skeleton';

export { Switch, type SwitchProps } from './Switch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const propTypes = {
aggregation: PropTypes.string,
compositeOperation: PropTypes.string,
dotRadius: PropTypes.number,
globalOpacity: PropTypes.number,
lngLatAccessor: PropTypes.func,
locations: PropTypes.arrayOf(PropTypes.object).isRequired,
pointRadiusUnit: PropTypes.string,
Expand Down Expand Up @@ -121,6 +122,7 @@ class ScatterPlotGlowOverlay extends PureComponent {
aggregation,
compositeOperation,
dotRadius,
globalOpacity,
lngLatAccessor,
locations,
pointRadiusUnit,
Expand Down Expand Up @@ -180,7 +182,7 @@ class ScatterPlotGlowOverlay extends PureComponent {

gradient.addColorStop(
1,
`rgba(${rgb[1]}, ${rgb[2]}, ${rgb[3]}, 0.8)`,
`rgba(${rgb[1]}, ${rgb[2]}, ${rgb[3]}, ${0.8 * globalOpacity})`,
);
gradient.addColorStop(
0,
Expand Down Expand Up @@ -251,7 +253,7 @@ class ScatterPlotGlowOverlay extends PureComponent {
0,
Math.PI * 2,
);
ctx.fillStyle = `rgb(${rgb[1]}, ${rgb[2]}, ${rgb[3]})`;
ctx.fillStyle = `rgba(${rgb[1]}, ${rgb[2]}, ${rgb[3]}, ${globalOpacity})`;
ctx.fill();

if (pointLabel !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"d3-color": "^1.4.1",
"d3-scale": "^3.0.0",
"handlebars": "^4.7.8",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"mousetrap": "^1.6.5",
"ngeohash": "^0.6.3",
"prop-types": "^15.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,37 @@ describe('Polygon transformProps', () => {
emitCrossFilters: false,
};

const mockedChartPropsWithGeoHash: Partial<ChartProps> = {
...mockChartProps,
rawFormData: {
line_column: 'geohash',
line_type: 'geohash',
viewport: {},
},
queriesData: [
{
data: [
{
geohash: '9q8yt',
'sum(population)': 9800,
},
{
geohash: '9q8yk',
'sum(population)': 13100,
},
{
geohash: '9q8yv',
'sum(population)': 15600,
},
{
geohash: '9q8yq',
'sum(population)': 7500,
},
],
},
],
};

test('should use constant elevation value when point_radius_fixed type is "fix"', () => {
const fixProps = {
...mockChartProps,
Expand Down Expand Up @@ -257,4 +288,23 @@ describe('Polygon transformProps', () => {
expect(features).toHaveLength(1);
expect(features[0]?.elevation).toBeUndefined();
});

test('should handle geohash decoding successfully', () => {
const props = {
...mockedChartPropsWithGeoHash,
rawFormData: {
...mockedChartPropsWithGeoHash.rawFormData,
point_radius_fixed: {
type: 'fix',
value: '1000',
},
},
};

const result = transformProps(props as ChartProps);

const features = result.payload.data.features as PolygonFeature[];
expect(features.flatMap(p => p?.polygon || [])).toHaveLength(20); // 4 geohashes x 5 corners each
expect(features[0]?.elevation).toBe(1000);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
addPropertiesToFeature,
} from '../transformUtils';
import { DeckPolygonFormData } from './buildQuery';
import { decode_bbox } from 'ngeohash';

function parseElevationValue(value: string): number | undefined {
const parsed = parseFloat(value);
Expand Down Expand Up @@ -122,6 +123,16 @@ function processPolygonData(
break;
}
case 'geohash':
polygonCoords = [];
const decoded = decode_bbox(String(rawPolygonData));
if (decoded) {
polygonCoords.push([decoded[1], decoded[0]]); // SW (minLon, minLat)
polygonCoords.push([decoded[1], decoded[2]]); // NW (minLon, maxLat)
polygonCoords.push([decoded[3], decoded[2]]); // NE (maxLon, maxLat)
polygonCoords.push([decoded[3], decoded[0]]); // SE (maxLon, minLat)
polygonCoords.push([decoded[1], decoded[0]]); // SW (close polygon)
}
break;
case 'zipcode':
default: {
polygonCoords = Array.isArray(rawPolygonData) ? rawPolygonData : [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"d3": "^3.5.17",
"d3-tip": "^0.9.1",
"fast-safe-stringify": "^2.1.1",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"nvd3-fork": "^2.0.5",
"dompurify": "^3.3.1",
"prop-types": "^15.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/react-table": "^7.7.20",
"classnames": "^2.5.1",
"d3-array": "^3.2.4",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"memoize-one": "^5.2.1",
"react-table": "^7.8.0",
"regenerator-runtime": "^0.14.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"dependencies": {
"@types/geojson": "^7946.0.10",
"geojson": "^0.5.0",
"lodash": "^4.17.21"
"lodash": "^4.17.23"
},
"peerDependencies": {
"@ant-design/icons": "^5.2.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@types/react-redux": "^7.1.34",
"d3-array": "^3.2.4",
"lodash": "^4.17.21"
"lodash": "^4.17.23"
},
"peerDependencies": {
"@apache-superset/core": "*",
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/plugins/plugin-chart-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/react-table": "^7.7.20",
"classnames": "^2.5.1",
"d3-array": "^3.2.4",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"memoize-one": "^5.2.1",
"react-table": "^7.8.0",
"regenerator-runtime": "^0.14.1",
Expand Down
Loading
Loading