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

Table with a null partition value throws NPE #1867

Closed
mofojed opened this issue Mar 12, 2024 · 1 comment · Fixed by #1954 or deephaven/deephaven-core#5439
Closed

Table with a null partition value throws NPE #1867

mofojed opened this issue Mar 12, 2024 · 1 comment · Fixed by #1954 or deephaven/deephaven-core#5439
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mofojed
Copy link
Member

mofojed commented Mar 12, 2024

Reported with https://deephaven.atlassian.net/browse/DH-16595

Table throws NPE:

LogProxy.js:87 [IrisGrid] TypeError: java.lang.NullPointerException
    at NullPointerException.createError_0 [as createError] (irisapi.nocache.js:1541:10)
    at NullPointerException.initializeBackingError (irisapi.nocache.js:1329:46)
    at NullPointerException.Throwable (irisapi.nocache.js:1268:8)
    at NullPointerException.Exception (irisapi.nocache.js:1341:16)
    at NullPointerException.RuntimeException (irisapi.nocache.js:1366:16)
    at NullPointerException.JsException (irisapi.nocache.js:1515:23)
    at new NullPointerException (irisapi.nocache.js:1528:18)
    at Object.requireNonNull (irisapi.nocache.js:52632:16)
    at Object.ofString_0 [as ofString] (irisapi.nocache.js:16421:6)
    at lm.updatePartition (IrisGrid.js:1256:76)
    at IrisGrid.js:1230:17
    at Generator.next (<anonymous>)
    at gTe (IrisGrid.js:1:99)
    at o (IrisGrid.js:2:194)
isEnabled.console.error @ LogProxy.js:87
LogProxy.js:87 [IrisGridPanel] TypeError: java.lang.NullPointerException
    at NullPointerException.createError_0 [as createError] (irisapi.nocache.js:1541:10)
    at NullPointerException.initializeBackingError (irisapi.nocache.js:1329:46)
    at NullPointerException.Throwable (irisapi.nocache.js:1268:8)
    at NullPointerException.Exception (irisapi.nocache.js:1341:16)
    at NullPointerException.RuntimeException (irisapi.nocache.js:1366:16)
    at NullPointerException.JsException (irisapi.nocache.js:1515:23)
    at new NullPointerException (irisapi.nocache.js:1528:18)
    at Object.requireNonNull (irisapi.nocache.js:52632:16)
    at Object.ofString_0 [as ofString] (irisapi.nocache.js:16421:6)
    at lm.updatePartition (IrisGrid.js:1256:76)
    at IrisGrid.js:1230:17
    at Generator.next (<anonymous>)
    at gTe (IrisGrid.js:1:99)
    at o (IrisGrid.js:2:194)
@mofojed mofojed added bug Something isn't working triage Issue requires triage labels Mar 12, 2024
@vbabich vbabich added this to the March 2024 milestone Mar 12, 2024
@vbabich vbabich removed the triage Issue requires triage label Mar 12, 2024
@mofojed
Copy link
Member Author

mofojed commented Mar 18, 2024

Not reproducible on Community with a table with null key values:

from deephaven import new_table
from deephaven.column import string_col, int_col

source = new_table([
    string_col("X", ["A", "B", None, "C", "B", None, "B", "B", "C"]),
    string_col("Y", ["M", "N", "O", "N", "P", "M", "O", "P", "M"]),
    int_col("Number", [55, 76, 20, 130, 230, 50, 73, 137, 214]),
])

partitioned_table = source.partition_by(by="X")

There must be something else going on

@mofojed mofojed assigned vbabich and unassigned wusteven815 Apr 1, 2024
@mofojed mofojed modified the milestones: March 2024, April 2024 Apr 12, 2024
@mofojed mofojed assigned mofojed and vbabich and unassigned vbabich and mofojed Apr 15, 2024
vbabich added a commit that referenced this issue Apr 24, 2024
Closes #1867

Tested in Enterprise using steps from DH-16595 - created a partitioned
table and set ACL to `nullFilterGenerator()` to get the `null` value in
the partition column. Creating a partitioned table with a `null` in the
partition column doesn't seem possible with `db.addTablePartition` in
Enterprise.

```
t=db.t("LearnDeephaven", "StockTrades").where()
db.addPartitionedTableDefinition("<namespace>", "partTable", "Date", t.getDefinition())
test = db.t("<namespace>" , "partTable")

// Set Column ACL on `partTable` to `new NullFilterGenerator()` in swing

test = db.t("<namespace>" , "partTable")
```
![Screenshot 2024-04-23 at 5 26
43 PM](https://github.com/deephaven/web-client-ui/assets/2853653/bbd65305-4616-416d-8af3-96dadcc21fa1)


Core+ Groovy console:
```
t = emptyTable(1).update("X=(String)null","Y=ii").partitionBy("X")
```
![Screenshot 2024-04-23 at 5 23
55 PM](https://github.com/deephaven/web-client-ui/assets/2853653/0564a626-97fa-46d9-8920-200eda19c533)

---------

Co-authored-by: Mike Bender <mikebender@deephaven.io>
mofojed pushed a commit to deephaven/deephaven-core that referenced this issue May 1, 2024
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.75.0

# [0.75.0](deephaven/web-client-ui@v0.74.0...v0.75.0) (2024-05-01)


### Bug Fixes

* change fira source ([#1944](deephaven/web-client-ui#1944)) ([07e5a26](deephaven/web-client-ui@07e5a26)), closes [#1902](deephaven/web-client-ui#1902)
* Fix null partition filter ([#1954](deephaven/web-client-ui#1954)) ([3a1f92b](deephaven/web-client-ui@3a1f92b)), closes [#1867](deephaven/web-client-ui#1867)


### Features

* context menu reopen for stack only ([#1932](deephaven/web-client-ui#1932)) ([6a9a6a4](deephaven/web-client-ui@6a9a6a4)), closes [#1931](deephaven/web-client-ui#1931)
* Create an ErrorView that can be used to display errors ([#1965](deephaven/web-client-ui#1965)) ([65ef1a7](deephaven/web-client-ui@65ef1a7))
* ListView + Picker - Item icon support ([#1959](deephaven/web-client-ui#1959)) ([cb13c60](deephaven/web-client-ui@cb13c60)), closes [#1890](deephaven/web-client-ui#1890)
* Picker - initial scroll position ([#1942](deephaven/web-client-ui#1942)) ([5f49761](deephaven/web-client-ui@5f49761)), closes [#1890](deephaven/web-client-ui#1890) [#1935](deephaven/web-client-ui#1935)

Co-authored-by: deephaven-internal <66694643+deephaven-internal@users.noreply.github.com>
stanbrub pushed a commit to deephaven/deephaven-core that referenced this issue May 3, 2024
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.75.0

# [0.75.0](deephaven/web-client-ui@v0.74.0...v0.75.0) (2024-05-01)


### Bug Fixes

* change fira source ([#1944](deephaven/web-client-ui#1944)) ([07e5a26](deephaven/web-client-ui@07e5a26)), closes [#1902](deephaven/web-client-ui#1902)
* Fix null partition filter ([#1954](deephaven/web-client-ui#1954)) ([3a1f92b](deephaven/web-client-ui@3a1f92b)), closes [#1867](deephaven/web-client-ui#1867)


### Features

* context menu reopen for stack only ([#1932](deephaven/web-client-ui#1932)) ([6a9a6a4](deephaven/web-client-ui@6a9a6a4)), closes [#1931](deephaven/web-client-ui#1931)
* Create an ErrorView that can be used to display errors ([#1965](deephaven/web-client-ui#1965)) ([65ef1a7](deephaven/web-client-ui@65ef1a7))
* ListView + Picker - Item icon support ([#1959](deephaven/web-client-ui#1959)) ([cb13c60](deephaven/web-client-ui@cb13c60)), closes [#1890](deephaven/web-client-ui#1890)
* Picker - initial scroll position ([#1942](deephaven/web-client-ui#1942)) ([5f49761](deephaven/web-client-ui@5f49761)), closes [#1890](deephaven/web-client-ui#1890) [#1935](deephaven/web-client-ui#1935)

Co-authored-by: deephaven-internal <66694643+deephaven-internal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants