-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-39759][SQL] Implement listIndexes in JDBC (H2 dialect) #37172
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
Conversation
| indexMap += (indexName -> newIndex) | ||
| } else { | ||
| val properties = new util.Properties() | ||
| if (StringUtils.isNotEmpty(indexComment)) properties.put("COMMENT", indexComment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I found possible null pointer in the implementation of listIndexes(H2), indexComment default value is null.
However, the default value of MySQLDIalect is empty String.
@huaxingao
|
ping @huaxingao |
|
Can one of the admins verify this patch? |
sql/core/src/main/scala/org/apache/spark/sql/jdbc/H2Dialect.scala
Outdated
Show resolved
Hide resolved
|
Does H2 support composite index? |
1.add follow code in beforeAll:conn.prepareStatement( 2.change UTval loaded = Catalogs.load("h2", conf) 3.debug view |
|
Merged to master. Thanks @panbingkun |

What changes were proposed in this pull request?
Implementing listIndexes in DS V2 JDBC for H2 dialect.
Why are the changes needed?
This is a subtask of the V2 Index support(https://issues.apache.org/jira/browse/SPARK-36525).
It can better test the index interface locally.
Does this PR introduce any user-facing change?
Yes, listIndexes in DS V2 JDBC for H2
How was this patch tested?
Update existed UT.