Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-3090

Parsing error on Preview in Teiid Designer if the source column has a default value

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.0.1
    • Fix Version/s: None
    • Component/s: Data Preview
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Create a table in a database or add a default value to an existing column, I used Postgres:
      CREATE TABLE deb.mytable
      (
      idnum integer NOT NULL,
      fullname text DEFAULT 'user name'::text,
      CONSTRAINT pk_idnum PRIMARY KEY (idnum)
      )

      2. Import that source into the designer
      3. Try to Preview the data for that table that contains the default value
      4. You'll get an error in the Designer and the server log will show the parsing error on the metadata load:
      13:40:03,990 WARN [org.teiid.RUNTIME] (teiid-async-threads - 4) TEIID50036 VDB PREVIEW-32405570-21e1-4a40-ace7-21b408420884.1 model "debschema" metadata failed to load. Reason:TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT ''[*]user[*] name'::text'" at line 4, column 47.
      Was expecting: "options" | "," | ")": org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT ''[*]user[*] name'::text'" at line 4, column 47.
      Was expecting: "options" | "," | ")"
      at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:472) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.metadata.MetadataFactory.parse(MetadataFactory.java:769) [teiid-api-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.query.metadata.DDLMetadataRepository.loadMetadata(DDLMetadataRepository.java:40) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:84) [teiid-runtime-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.jboss.VDBService$7.run(VDBService.java:446) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT ''[*]user[*] name'::text'" at line 4, column 47.
      Was expecting: "options" | "," | ")"
      at org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:214) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      ... 11 more

      5. Deploying as VDB and querying works fine.

      Show
      Create a table in a database or add a default value to an existing column, I used Postgres: CREATE TABLE deb.mytable ( idnum integer NOT NULL, fullname text DEFAULT 'user name'::text, CONSTRAINT pk_idnum PRIMARY KEY (idnum) ) 2. Import that source into the designer 3. Try to Preview the data for that table that contains the default value 4. You'll get an error in the Designer and the server log will show the parsing error on the metadata load: 13:40:03,990 WARN [org.teiid.RUNTIME] (teiid-async-threads - 4) TEIID50036 VDB PREVIEW-32405570-21e1-4a40-ace7-21b408420884.1 model "debschema" metadata failed to load. Reason:TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT '' [*] user [*] name'::text'" at line 4, column 47. Was expecting: "options" | "," | ")": org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT '' [*] user [*] name'::text'" at line 4, column 47. Was expecting: "options" | "," | ")" at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:472) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at org.teiid.metadata.MetadataFactory.parse(MetadataFactory.java:769) [teiid-api-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at org.teiid.query.metadata.DDLMetadataRepository.loadMetadata(DDLMetadataRepository.java:40) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:84) [teiid-runtime-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at org.teiid.jboss.VDBService$7.run(VDBService.java:446) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60] at org.jboss.threads.JBossThread.run(JBossThread.java:122) Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT '' [*] user [*] name'::text'" at line 4, column 47. Was expecting: "options" | "," | ")" at org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:214) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2] ... 11 more 5. Deploying as VDB and querying works fine.

      Description

      Parsing error[1] on Preview in Teiid Designer if the source column has a default value.

      [1]
      13:40:03,990 WARN [org.teiid.RUNTIME] (teiid-async-threads - 4) TEIID50036 VDB PREVIEW-32405570-21e1-4a40-ace7-21b408420884.1 model "debschema" metadata failed to load. Reason:TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT ''[*]user[*] name'::text'" at line 4, column 47.
      Was expecting: "options" | "," | ")": org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT ''[*]user[*] name'::text'" at line 4, column 47.
      Was expecting: "options" | "," | ")"
      at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:472) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.metadata.MetadataFactory.parse(MetadataFactory.java:769) [teiid-api-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.query.metadata.DDLMetadataRepository.loadMetadata(DDLMetadataRepository.java:40) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:84) [teiid-runtime-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at org.teiid.jboss.VDBService$7.run(VDBService.java:446) [teiid-jboss-integration-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered ") DEFAULT ''[*]user[*] name'::text'" at line 4, column 47.
      Was expecting: "options" | "," | ")"
      at org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:214) [teiid-engine-8.12.10.6_3-redhat-2.jar:8.12.10.6_3-redhat-2]
      ... 11 more

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  blafond Barry LaFond
                  Reporter:
                  dsteigne Deborah Steigner
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: