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

'ArrayIndexOutOfBoundsException' when stream to stream join is used in 'INSERT INTO <jdbc mapping> SELECT ...' [HZ-1575] #22459

Closed
sumnerib opened this issue Oct 12, 2022 · 3 comments
Assignees
Labels
Source: Internal PR or issue was opened by an employee Team: SQL to-jira Type: Defect
Milestone

Comments

@sumnerib
Copy link
Contributor

Describe the bug
If a stream to stream join is performed in the SELECT portion of an INSERT INTO <jdbc mapping> SELECT ... statement, it fails with something like: com.hazelcast.jet.JetException: Execution on a member failed: com.hazelcast.jet.JetException: Exception in ProcessorTasklet{08c7-5099-23c2-0001/Kafka[public.t1]#1}: java.lang.ArrayIndexOutOfBoundsException: 2.

Expected behavior
The results of the stream to stream join should be inserted into the remote table connected via JDBC.

To Reproduce

Steps to reproduce the behavior:

  1. Start a member that has a configured external-data-store
  2. Start a Kafka cluster (a docker contain that works w/o Zookeeper can be started with: docker run -p 9092:9092 -d bashj79/kafka-kraft
  3. Create Kafka topics and their corresponding mappings in HZ
  4. Create the necessary VIEWs of the Kafka mappings required for s2sj (see Handling Late Events for more info)
  5. Create a JDBC mapping to a table in the external store
  6. Execute a SQL statement in the form:
INSERT INTO jdbc_table (x, y, ts)
SELECT s1.x AS x, s2.y AS y, s2.ts AS ts
FROM stream1_view s1 JOIN stream2_view s2 
ON s1.x = s2.y AND s2.ts BETWEEN s1.ts AND s1.ts + INTERVAL '1' DAY

Step 6 fails with an exception. Example member log attached.

Additional context

The same type of query is successful if the target of the INSERT is an IMap rather than a remote table.

@github-actions github-actions bot changed the title 'ArrayIndexOutOfBoundsException' when stream to stream join is used in 'INSERT INTO <jdbc mapping> SELECT ...' 'ArrayIndexOutOfBoundsException' when stream to stream join is used in 'INSERT INTO <jdbc mapping> SELECT ...' [HZ-1575] Oct 12, 2022
@github-actions
Copy link
Contributor

Internal Jira issue: HZ-1575

@viliam-durina viliam-durina added this to the 5.3.0 milestone Oct 17, 2022
@sumnerib sumnerib added Team: SQL Source: Internal PR or issue was opened by an employee labels Nov 7, 2022
@k-jamroz
Copy link
Collaborator

There were some changed to this logic (especially parts in stacktrace) in #22641 - possibly fixed, if it does not reproduce anymore.

@AyberkSorgun AyberkSorgun modified the milestones: 5.3.0, 5.4.0 May 15, 2023
@sumnerib
Copy link
Contributor Author

Confirmed this is no longer reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Team: SQL to-jira Type: Defect
Projects
None yet
Development

No branches or pull requests

5 participants