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

[fix][sql][branch-3.0] Fix UUID convert failed for JSON schema #23292

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

shibd
Copy link
Member

@shibd shibd commented Sep 12, 2024

Motivation

If using JSON schema and UUID type, will receive error when use trino.

java.lang.IllegalStateException: Expected entry size to be exactly 16 but was 36
	at io.trino.spi.type.UuidType.writeSlice(UuidType.java:143)
	at io.trino.spi.connector.RecordPageSource.getNextPage(RecordPageSource.java:113)
	at io.trino.operator.TableScanOperator.getOutput(TableScanOperator.java:311)
	at io.trino.operator.Driver.processInternal(Driver.java:388)
	at io.trino.operator.Driver.lambda$processFor$9(Driver.java:292)
	at io.trino.operator.Driver.tryWithLock(Driver.java:685)
	at io.trino.operator.Driver.processFor(Driver.java:285)
	at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1076)
	at io.trino.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
	at io.trino.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:488)
	at io.trino.$gen.Trino_368____20240912_093830_2.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

#21267 supported UUID type, but for JSON schema not convert to UUID type of trino.

Modifications

  • For JSON schema,convert to UUID type of trino.

Verifying this change

  • Change TestJsonDecoder to cover it.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@shibd shibd self-assigned this Sep 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 12, 2024
@shibd shibd added type/bug The PR fixed a bug or issue reported a bug ready-to-test release/3.0.7 and removed doc-not-needed Your PR changes do not impact docs labels Sep 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 12, 2024
@shibd shibd closed this Sep 12, 2024
@shibd shibd reopened this Sep 12, 2024
@shibd shibd merged commit 4d6310c into apache:branch-3.0 Sep 12, 2024
63 of 67 checks passed
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 19, 2024
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-3.0 doc-not-needed Your PR changes do not impact docs ready-to-test release/3.0.7 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants