Skip to content

Support multiply(long, java.time.Duration) #5379

@alexpeters1208

Description

@alexpeters1208

This code block:

time_ops = empty_table(10).update(
    [
        "BaseTime = '2021-07-11T12:00:00.000Z'",
        "Timestamp = BaseTime + (ii * 'PT1h')"
    ]
)

Fails because multiply(long, java.time.Duration) is not implemented. There are a couple of alternatives:

time_ops = empty_table(10).update(
    [
        "BaseTime = '2021-07-11T12:00:00.000Z'",
        "Timestamp = BaseTime + 'PT1h'.multipliedBy(ii)"
    ]
)

or

time_ops = empty_table(10).update(
    [
        "BaseTime = '2021-07-11T12:00:00.000Z'",
        "Timestamp = BaseTime + (ii * HOUR)"
    ]
)

However, I think supporting multiply(long, java.time.Duration) is reasonable and well-defined.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions