Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-283 Add Table Partitioning
  3. TAJO-369

Add CREATE EXTERNAL TABLE... BY PARTITION statement to parser

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: SQL Parser
    • Labels:
      None

      Description

      I found parse error when I wrote 'CREATE EXTERNAL TABLE BY PARTITION' statement as follows:

      2013-12-03 16:42:36,800 ERROR master.GlobalEngine (GlobalEngine.java:executeQuery(172)) - 
      Stack Trace:
      org.apache.tajo.engine.parser.SQLSyntaxError: ERROR: mismatched input 'PARTITION' expecting <EOF>
      LINE 1:123  ... ON 'hdfs://localhost:9010/tajo/warehouse/sales_column3' PARTITION BY COLUMN(col1)
      	at org.apache.tajo.engine.parser.SQLAnalyzer.parse(SQLAnalyzer.java:64)
      	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:134)
      	at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:131)
      	at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:228)
      

      SQLAnalyzer needs to support this statement.

        Activity

        Hide
        blrunner Jaehwa Jung added a comment -

        This is not a bug.
        Partition conditions must be located before table path as follows:

         create external table table1 (id int, name text, score float, type text)
         using csv with ('csvfile.delimiter'='|') 
         PARTITION BY COLUMN (id)
         location 'Xyz'
        
        Show
        blrunner Jaehwa Jung added a comment - This is not a bug. Partition conditions must be located before table path as follows: create external table table1 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') PARTITION BY COLUMN (id) location 'Xyz'

          People

          • Assignee:
            blrunner Jaehwa Jung
            Reporter:
            blrunner Jaehwa Jung
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development