kerwin-zk commented on code in PR #7924:
URL: https://github.com/apache/paimon/pull/7924#discussion_r3296656360


##########
paimon-spark/paimon-spark-4.0/src/main/scala/org/apache/spark/sql/catalyst/parser/extensions/AbstractPaimonSparkSqlExtensionsParser.scala:
##########
@@ -52,30 +52,76 @@ import scala.collection.JavaConverters._
  * @param delegate
  *   The extension parser.
  */
+// Keep this class in the Spark 4.0 module so it is compiled against Spark 
4.0's ParserInterface.
 abstract class AbstractPaimonSparkSqlExtensionsParser(val delegate: 
ParserInterface)
   extends org.apache.spark.sql.catalyst.parser.ParserInterface
   with Logging {
 
   private lazy val substitutor = new VariableSubstitution()
   private lazy val astBuilder = new PaimonSqlExtensionsAstBuilder(delegate)
+  private val nonReservedIdentifierTokenTypes = Set(

Review Comment:
     @Zouxxyy  This set is only used by the lightweight `maybeCreateTableLike` 
pre-check.
   
     It mirrors the `nonReserved` identifier rule in `PaimonSqlExtensions.g4`. 
The lexer returns words such as `TAG`, `LIKE`, `MAP`, etc. as keyword token
     types, but the grammar still allows them to be used as unquoted identifier 
parts. Without this set, a valid statement like `CREATE TABLE
     paimon.default.tag LIKE ...` would not be recognized by the pre-check and 
could fall back to Spark's parser, bypassing the Paimon parser path for
     catalog-qualified `CREATE TABLE LIKE`.



-- 
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]

Reply via email to