deephaven / deephaven-core

Deephaven Community Core
Other
255 stars 81 forks source link

Deephaven Query Language should support NumPy types #1349

Open chipkent opened 3 years ago

chipkent commented 3 years ago

The Deephaven Query Language should support NumPy types.

Consider this example:

from deephaven.TableTools import emptyTable
import numpy
x = 60000000000
y = numpy.int64(x)
t1 = emptyTable(10).update("A = y")
t2 = emptyTable(10).update("B = (long)y")

There are two problems: 1) Column A in t1 is of type org.jpy.PyObject instead of long. 2) The cast in t2 fails because org.jpy.PyObject can not be cast to a java.lang.Long.

rcaudy commented 3 years ago

Is the desired solution an auto-conversion feature?

chipkent commented 2 years ago

Autocasting seems like a reasonable solution.