mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix issue with spurious changes produced by Calculate action.
Summary: - Replace unicode strings with byte strings when decoding values in sandbox. - Columns that rely on float values should derive from NumericColumn, so that set() ensures that a float is stored even if loading an int. - Parse unmarshallable values (['U']) into an object that can be encoded back to the same value (rather than info a RaisedException). - Compare NaN's as equal for deciding whether a change is a no-op. Unrelated: - Removed a tiny bit of unhelpful logging Test Plan: Added a test case that reproduces several causes of Calculate discrepancies by loading various values into various types of formula columns. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2676
This commit is contained in:
@@ -564,7 +564,6 @@ export class ActiveDoc extends EventEmitter {
|
||||
*/
|
||||
public async fetchTable(docSession: OptDocSession, tableId: string,
|
||||
waitForFormulas: boolean = false): Promise<TableDataAction> {
|
||||
this.logInfo(docSession, "fetchTable(%s, %s)", docSession, tableId);
|
||||
return this.fetchQuery(docSession, {tableId, filters: {}}, waitForFormulas);
|
||||
}
|
||||
|
||||
@@ -593,7 +592,7 @@ export class ActiveDoc extends EventEmitter {
|
||||
const wantFull = waitForFormulas || query.tableId.startsWith('_grist_') ||
|
||||
tableAccess.read === 'mixed';
|
||||
const onDemand = this._onDemandActions.isOnDemand(query.tableId);
|
||||
this.logInfo(docSession, "fetchQuery(%s, %s) %s", docSession, JSON.stringify(query),
|
||||
this.logInfo(docSession, "fetchQuery %s %s", JSON.stringify(query),
|
||||
onDemand ? "(onDemand)" : "(regular)");
|
||||
let data: TableDataAction;
|
||||
if (onDemand) {
|
||||
|
||||
Reference in New Issue
Block a user