apache / apache/wayang

may need better support for CASTing in the future. See sqlCast() in this file.

Open
#676 2 comments 0 reactions 0 assignees View on GitHub
todo
Dominant language
Java
Stars
274
Forks
140
Avg merge
5d 16h
Merged PRs (30d)
4

Description

may need better support for CASTing in the future. See sqlCast() in this file.

https://github.com/apache/wayang/blob/6172a5f464f5feb3e16f2fdbd52a63584ad2b861/wayang-api/wayang-api-sql/src/main/java/org/apache/wayang/api/sql/calcite/converter/functions/FilterPredicateImpl.java#L59

```java

case OR -> input.stream().anyMatch(obj -> Boolean.class.cast(obj).booleanValue());
case MINUS -> widenToDouble.apply(input.get(0)) - widenToDouble.apply(input.get(1));
case PLUS -> widenToDouble.apply(input.get(0)) + widenToDouble.apply(input.get(1));
// TODO: may need better support for CASTing in the future. See sqlCast() in this file.
case CAST -> input.get(0) instanceof Number ? widenToDouble.apply(input.get(0)) : ensureComparable.apply(input.get(0));
case SEARCH -> {
if (input.get(0) instanceof final ImmutableRangeSet range) {
assert input.get(1) instanceof Comparable

```

574e6ce855e095df10910a104022003f75d4c82c

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.