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

Front end data type display exception #6888

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
7 changes: 4 additions & 3 deletions client/app/services/query-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { axios } from "@/services/axios";
import { QueryResultError } from "@/services/query";
import { Auth } from "@/services/auth";
import { isString, uniqBy, each, isNumber, includes, extend, forOwn, get } from "lodash";
import JSONbig from 'json-bigint';
mirkan1 marked this conversation as resolved.
Show resolved Hide resolved

const JSONbigString = require("json-bigint")({ storeAsString: true });
const { parse: jsonParse } = JSONbig({ storeAsString: true });
mirkan1 marked this conversation as resolved.
Show resolved Hide resolved
const logger = debug("redash:services:QueryResult");
const filterTypes = ["filter", "multi-filter", "multiFilter"];

Expand Down Expand Up @@ -48,7 +49,7 @@ const createOrSaveUrl = data => (data.id ? `api/query_results/${data.id}` : "api
const QueryResultResource = {
get: ({ id }) =>
axios.get(`api/query_results/${id}`, {
transformResponse: response => JSONbigString.parse(response),
transformResponse: response => jsonParse(response),
}),
post: data => axios.post(createOrSaveUrl(data), data),
};
Expand Down Expand Up @@ -353,7 +354,7 @@ class QueryResult {

axios
.get(`api/queries/${queryId}/results/${id}.json`, {
transformResponse: response => JSONbigString.parse(response),
transformResponse: response => jsonParse(response),
})
.then(response => {
// Success handler
Expand Down
2 changes: 1 addition & 1 deletion viz-lib/src/visualizations/table/columns/number.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function initNumberColumn(column: any) {

function prepareData(row: any) {
return {
text: format(row[column.name])
text: format(row[column.name]),
};
}

Expand Down