Hi All, Trying to understand this error from Flink...
# troubleshooting
d
Hi All, Trying to understand this error from Flink. I'm going from a table with "ticker, price, event_time" to a tumbling window and something about my aggregation is giving flink a hard time:
Copy code
py4j.protocol.Py4JJavaError: An error occurred while calling o8.executeSql.
: java.lang.AssertionError: Conversion to relational algebra failed to preserve datatypes:
validated type:
RecordType(VARCHAR(6) CHARACTER SET "UTF-16LE" ticker, FLOAT EXPR$0, TIMESTAMP(3) EXPR$1) NOT NULL
converted type:
RecordType(VARCHAR(6) CHARACTER SET "UTF-16LE" ticker, FLOAT EXPR$0, TIMESTAMP(3) NOT NULL EXPR$1) NOT NULL
rel:
I'm not really sure what this error means? My aggregation is pretty simple:
Copy code
165     tumble_window = Tumble.over(lit(10).seconds).on(col("event_time")).alias("w")
166     mean_ticker = input_table.window(tumble_window) \
167                         .group_by(col("ticker"), col('w')) \
168                         .select(col("ticker"), vector_mean(col('price')), col('w').end)
Seems like it has something to do with watermarks on the destination table
I'm not sure if this is a bug or something weird with the way I'm defining the window
I really don't know where these null constraints are coming from
If i put in
col('w').rowtime
for the final select column the stream works... but I don't understand why
Also when I add a NOT NULL constraint in my sink it doesn't seem to register and i get errors on this stream
For others who are interested, I ended up casting the type to TIMESTAMP
seems like kind of a weird work around but it got me unblocked