Skip to content

Commit

Permalink
[sql lab] handle large ints, prevent overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Sep 11, 2018
1 parent 73db918 commit 2589d2f
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 472 deletions.
1 change: 1 addition & 0 deletions superset/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"immutable": "^3.8.2",
"jed": "^1.1.1",
"jquery": "3.1.1",
"json-bigint": "^0.3.0",
"lodash.throttle": "^4.1.1",
"mapbox-gl": "^0.45.0",
"mathjs": "^3.20.2",
Expand Down
7 changes: 5 additions & 2 deletions superset/assets/src/SqlLab/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* eslint no-undef: 2 */
import $ from 'jquery';
import shortid from 'shortid';
import JSONbig from 'json-bigint';

import { now } from '../modules/dates';
import { t } from '../locales';
import {
Expand Down Expand Up @@ -125,10 +127,11 @@ export function fetchQueryResults(query) {
const sqlJsonUrl = `/superset/results/${query.resultsKey}/`;
$.ajax({
type: 'GET',
dataType: 'json',
dataType: 'text',
url: sqlJsonUrl,
success(results) {
dispatch(querySuccess(query, results));
const parsedResults = JSONbig.parse(results);
dispatch(querySuccess(query, parsedResults));
},
error(err) {
let msg = t('Failed at retrieving results from the results backend');
Expand Down
Loading

0 comments on commit 2589d2f

Please sign in to comment.