Skip to content

[CALCITE-3388] StackOverflowError for creating structured RelDataType from class type#1486

Closed
yanlin-Lynn wants to merge 1 commit intoapache:masterfrom
yanlin-Lynn:struct-recursion
Closed

[CALCITE-3388] StackOverflowError for creating structured RelDataType from class type#1486
yanlin-Lynn wants to merge 1 commit intoapache:masterfrom
yanlin-Lynn:struct-recursion

Conversation

@yanlin-Lynn
Copy link
Copy Markdown
Contributor

When creating a structured RelDataType from a java type with recursion reference, StackOverflowError occurs. See jira CALCITE-3388 for full stack trace.

This PR tries to check for recursion and throw an exception with message showing recursion not supported

@yanlin-Lynn yanlin-Lynn changed the title [CALCITE-3388] StackOverflowError for creating structured RelDataType from class type [WIP][CALCITE-3388] StackOverflowError for creating structured RelDataType from class type Oct 5, 2019
final List<RelDataTypeField> list = new ArrayList<>();
for (Field field : type.getFields()) {
if (!Modifier.isStatic(field.getModifiers())) {
// FIXME: watch out for recursion
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@yanlin-Lynn yanlin-Lynn changed the title [WIP][CALCITE-3388] StackOverflowError for creating structured RelDataType from class type [CALCITE-3388] StackOverflowError for creating structured RelDataType from class type Oct 5, 2019
… from class type (Wang Yanlin)

Check for recursion and throw an exception with message showing recursion not supported
@yanlin-Lynn
Copy link
Copy Markdown
Contributor Author

Seems unnecessary, I'll just close this PR.

We can reopen it when it really happends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants