Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-7805

> io.debezium.text.ParsingException : SQL Contains Partition

XMLWordPrintable

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      2.6.0

      What is the connector configuration?

       

      What is the captured database version and mode of depoyment?

      AWS Oracle RDS

      What behaviour do you expect?

      create table event should handled

      What behaviour do you see?

      DDL parsing error araised, and connector goes down. 

      Do you see the same behaviour using the latest relesead Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      I'll try. 

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'CREATE TABLE SCHEMA_B.TABLE_A (
          C_DATE VARCHAR2(8) NOT NULL,
          C_SN NUMBER NOT NULL
      
      )
      PARTITION BY RANGE ( C_DATE )
      --INTERVAL ( numtoyminterval( 1, 'MONTH' ) )
      (
          PARTITION TABLE_A_202401 VALUES LESS THAN ('20240201'),
          PARTITION TABLE_A_202402 VALUES LESS THAN ('20240301'),
          PARTITION TABLE_A_202403 VALUES LESS THAN ('20240401'),
          PARTITION TABLE_A_202404 VALUES LESS THAN ('20240501'),
          PARTITION TABLE_A_202405 VALUES LESS THAN ('20240601'),
          PARTITION TABLE_A_202406 VALUES LESS THAN ('20240701'),
          PARTITION TABLE_A_202407 VALUES LESS THAN ('20240801'),
          PARTITION TABLE_A_202408 VALUES LESS THAN ('20240901'),
          PARTITION TABLE_A_202409 VALUES LESS THAN ('20241001'),
          PARTITION TABLE_A_202410 VALUES LESS THAN ('20241101'),
          PARTITION TABLE_A_202411 VALUES LESS THAN ('20241201'),
          PARTITION TABLE_A_202412 VALUES LESS THAN ('20250101'),
          PARTITION TABLE_A_202501 VALUES LESS THAN ('20250201')
      ) TABLESPACE TS_A;'
      mismatched input 'TABLESPACE' expecting {<EOF>, '/', ';'}
          at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:43)
          at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
          at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:543)
          at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:327)
          at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:139)
          at io.debezium.ddl.parser.oracle.generated.PlSqlParser.sql_script(PlSqlParser.java:2202)
          at io.debezium.connector.oracle.antlr.OracleDdlParser.parseTree(OracleDdlParser.java:73)
          at io.debezium.connector.oracle.antlr.OracleDdlParser.parseTree(OracleDdlParser.java:32)
          at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:78)
          at io.debezium.connector.oracle.antlr.OracleDdlParser.parse(OracleDdlParser.java:68)
          at io.debezium.connector.oracle.OracleSchemaChangeEventEmitter.emitSchemaChangeEvent(OracleSchemaChangeEventEmitter.java:104)
          at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:379)
          at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.handleSchemaChange(AbstractLogMinerEventProcessor.java:818)
          at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.handleSchemaChange(MemoryLogMinerEventProcessor.java:176)
          at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processRow(AbstractLogMinerEventProcessor.java:401)
          at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processResults(AbstractLogMinerEventProcessor.java:320)
          at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.process(AbstractLogMinerEventProcessor.java:241)
          at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:246)
          at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:61)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:280)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:197)
          at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:140)
          at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.antlr.v4.runtime.InputMismatchException
          at org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:270)
          at io.debezium.ddl.parser.oracle.generated.PlSqlParser.sql_script(PlSqlParser.java:2134)
          ... 21 more 

      How to reproduce the issue using our tutorial deployment?

      <Your answer>

      I'll try. 

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

       

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      <Your answer>

       

       think debezium-ddl-parser/src/main/antlr4/io/debezium/ddl/parser/oracle/generated/PlSqlParser.g4 should have expressionss for tablespace keyword. 

       

      table_partitioning_clauses
          : range_partitions
          | list_partitions
          | hash_partitions
          | composite_range_partitions
          | composite_list_partitions
          | composite_hash_partitions
          | reference_partitioning
          | system_partitioning
          ;
      
      
      range_partitions
          : PARTITION BY RANGE '(' column_name (',' column_name)* ')'
              (INTERVAL '(' expression ')' (STORE IN '(' tablespace (',' tablespace)* ')' )? )?
                '(' PARTITION partition_name? range_values_clause table_partition_description (',' PARTITION partition_name? range_values_clause table_partition_description)* ')'
          ;
      
      list_partitions
          : PARTITION BY LIST '(' column_name ')'
              '(' PARTITION partition_name? list_values_clause table_partition_description  (',' PARTITION partition_name? list_values_clause table_partition_description )* ')'
          ;
      
      relational_table
          : ('(' relational_property (',' relational_property)* ')')?
                (DEFAULT COLLATION collation_name)?
                (ON COMMIT (DELETE | PRESERVE) ROWS)?
                physical_properties?
                column_properties?
                table_partitioning_clauses?
                (CACHE | NOCACHE)? (RESULT_CACHE '(' MODE (DEFAULT | FORCE) ')')?
                parallel_clause?
                (ROWDEPENDENCIES | NOROWDEPENDENCIES)?
                (enable_disable_clause+)? row_movement_clause? logical_replication_clause? flashback_archive_clause? annotations_clause?
              ; 

       

       

              ccranfor@redhat.com Chris Cranford
              narusas Jisung Ahn (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: