freamdx commented on PR #1701:
URL: https://github.com/apache/sedona/pull/1701#issuecomment-2499981502
> Will the parser fallback to delegated parser when parsing fails? We had
#1547 to enable this fallback, otherwise the parser extensions of Iceberg or
Delta won't work correctly if they are registered prior to the initialization
of Sedona.
1. iceberg needs to be modified to support geometry type,integrate sedona is
the best solution
2. the parser of iceberg code, like this:
class IcebergSparkSqlExtensionsParser(delegate: ParserInterface) extends
ParserInterface ... {
......
// if use SedonaSqlParser, then delegate is SedonaSqlParser
override def parseDataType(sqlText: String): DataType = {
delegate.parseDataType(sqlText)
}
......
// override def parsePlan() in SedonaSqlParser is useless
override def parsePlan(sqlText: String): LogicalPlan = {
val sqlTextAfterSubstitution = substitutor.substitute(sqlText)
if (isIcebergCommand(sqlTextAfterSubstitution)) {
parse(sqlTextAfterSubstitution) { parser =>
astBuilder.visit(parser.singleStatement()) }.asInstanceOf[LogicalPlan]
} else {
......
}
}
......
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]