-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow double and float types to be rollupable
- We had this restriction in the UI, but the engine can actually handle it - Tested with doubles, floats - Tested with the following tables: ```python from deephaven import empty_table doubles = empty_table(1_000_000).update_view(["Group = i*10.4", "N = (i % 347)*0.1", "M = (i % 29)*10.2", "Value=i*2.4", "Weight=i*4.2"]) floats = empty_table(1_000_000).update_view(["Group = i*10.4", "N = (float)(i % 347)*0.1", "M = (float)(i % 29)*10.2", "Value=(float)i*2.4", "Weight=(float)i*4.2"]) ``` - Updated e2e tests and unit tests
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { type dh as DhType } from '@deephaven/jsapi-types'; | ||
import { TestUtils } from '@deephaven/test-utils'; | ||
import RollupRows from './RollupRows'; | ||
|
||
it('should allow all column types to be groupable', () => { | ||
function testType(type: string, expected = true) { | ||
const column = TestUtils.createMockProxy<DhType.Column>({ type }); | ||
expect(RollupRows.isGroupable(column)).toBe(expected); | ||
} | ||
|
||
testType('string'); | ||
testType('int'); | ||
testType('long'); | ||
testType('float'); | ||
testType('double'); | ||
testType('java.lang.String'); | ||
testType('java.lang.Integer'); | ||
testType('java.lang.Long'); | ||
testType('java.math.BigDecimal', false); | ||
testType('java.math.BigInteger', false); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters