[ https://issues.apache.org/jira/browse/SPARK-39639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
panbingkun updated SPARK-39639: ------------------------------- Description: h3. when: {quote}val indexComment = rs.getString("Index_comment") {color:#172b4d}*return null*{color} {quote} h3. then: {quote}if (indexComment.nonEmpty) properties.put("COMMENT", indexComment) {color:#172b4d}*throw NullPointerException*{color} {quote} h3. finally: {quote}MySQLDialect.listIndexes {color:#172b4d}return incorrect result(ingore exist index).{color} {quote} was: h3. when: {quote}val indexComment = rs.getString("Index_comment") {color:#172b4d}*return null*{color} {quote} FYI: String ResultSet.getString(String columnLabel) throws SQLException; return the column value; if the value is SQL NULL, the value returned is null h3. then: {quote}if (indexComment.nonEmpty) properties.put("COMMENT", indexComment) {color:#172b4d}*throw NullPointerException*{color} {quote} h3. finally: {quote}MySQLDialect.listIndexes {color:#172b4d}return incorrect result(ingore exist index).{color} {quote} > Fix possible null pointer in MySQLDialect listIndexes > ----------------------------------------------------- > > Key: SPARK-39639 > URL: https://issues.apache.org/jira/browse/SPARK-39639 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.4.0 > Reporter: panbingkun > Priority: Minor > > h3. when: > {quote}val indexComment = rs.getString("Index_comment") > {color:#172b4d}*return null*{color} > {quote} > h3. then: > {quote}if (indexComment.nonEmpty) properties.put("COMMENT", indexComment) > {color:#172b4d}*throw NullPointerException*{color} > {quote} > h3. finally: > {quote}MySQLDialect.listIndexes {color:#172b4d}return incorrect result(ingore > exist index).{color} > {quote} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org