Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Jul 10, 2023
1 parent 68c765e commit b43036f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion py/server/deephaven/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
YEARS_PER_NANO_AVG = 1 / YEAR_AVG #: Number of average (365.2425 day) years per nanosecond.


def _java_method(j_method: Callable) -> Callable:
def _java_method(j_method: Union[jpy.JMethod, jpy.JOverloadedMethod]) -> Callable:
"""A decorator for internal use only. It adds a few attributes to the wrapper func for use by Deephaven's
QueryLanguageParser to dynamically replace a Python wrapper function with the wrapped Java method.
The application of this decorator is limited to some functions in this module for now because these are the
utility/convenience functions that work directly on column data. If/when we wrap more such Java methods in Python,
we shall apply this optimization when appropriate.
"""
if type(j_method) not in (jpy.JMethod, jpy.JOverloadedMethod):
raise ValueError("Must be a JPY wrapped Java method")

Expand Down

0 comments on commit b43036f

Please sign in to comment.