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

After a call to CAST, results cannot be compared. #9185

Closed
jnh5y opened this issue Jun 8, 2022 · 0 comments
Closed

After a call to CAST, results cannot be compared. #9185

jnh5y opened this issue Jun 8, 2022 · 0 comments
Assignees
Labels
bug streaming-engine Tickets owned by the ksqlDB Streaming Team user-defined-functions Tickets about UDF, UDAF, UDTF

Comments

@jnh5y
Copy link
Member

jnh5y commented Jun 8, 2022

Describe the bug
A query like

SELECT *
FROM DataGen_Stream 
	WHERE CAST( FROM_UNIXTIME(REGISTERTIME) as DATE) <=  DATESUB(DAYS,365,'2018-09-23') 
EMIT CHANGES;

hits an error like

Invalid Predicate: Line 19, Column 14: A method named "compareTo" is not declared in any enclosing class nor any supertype, nor through a static import. expression: (CAST(FROM_UNIXTIME(REGISTERTIME) AS DATE) <= DATESUB(DAYS, 365, '2018-09-23')), schema:REGISTERTIME BIGINT, USERID STRING, REGIONID STRING, GENDER STRING, ROWTIME BIGINT, ROWPARTITION INTEGER, ROWOFFSET BIGINT Statement: Select * FROM DataGen_Stream WHERE CAST( FROM_UNIXTIME(REGISTERTIME) as DATE) <= DATESUB(DAYS,365,'2018-09-23') EMIT CHANGES;

Expected behavior
That one would be able to compare values after calling CAST.

@jnh5y jnh5y added bug needs-triage user-defined-functions Tickets about UDF, UDAF, UDTF streaming-engine Tickets owned by the ksqlDB Streaming Team and removed needs-triage labels Jun 8, 2022
@jnh5y jnh5y self-assigned this Jun 8, 2022
jnh5y added a commit that referenced this issue Jun 8, 2022
jnh5y added a commit that referenced this issue Jun 8, 2022
* fix: Allows results from CAST to compared.

Address #9185
@jnh5y jnh5y closed this as completed Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug streaming-engine Tickets owned by the ksqlDB Streaming Team user-defined-functions Tickets about UDF, UDAF, UDTF
Projects
None yet
Development

No branches or pull requests

1 participant