Improve the auto calculation function of query editor.