[ 
https://issues.apache.org/jira/browse/TAJO-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyunsik Choi updated TAJO-1353:
-------------------------------
    Description: 
This patch adds the nested record definition to CREATE TABLE BNF. The changed 
BNF is as follows:

{code}
predefined_type
  : character_string_type
  | national_character_string_type
  | binary_large_object_string_type
  | numeric_type
  | boolean_type
  | datetime_type
  | bit_type
  | binary_type
  | network_type
  | record_type
  ;

record_type
  : RECORD table_elements
  ;

table_elements
  : LEFT_PAREN field_element (COMMA field_element)* RIGHT_PAREN
  ;
{code}

Example statements as follows:
{code:sql}
CREATE TABLE T1 (
  A TEXT, 
  B INT4, 
  C RECORD (
    D TEXT, 
    E INT8, 
    F RECORD (
      G INT1, H FLOAT4
    )
  ), 
  Z FLOAT8
);
{code}

h3. Updates
 * I changed the type name 'struct' to 'record' according to TAJO-809.

  was:
This patch adds the nested record definition to CREATE TABLE BNF. The changed 
BNF is as follows:

{code}
predefined_type
  : character_string_type
  | national_character_string_type
  | binary_large_object_string_type
  | numeric_type
  | boolean_type
  | datetime_type
  | bit_type
  | binary_type
  | network_type
  | record_type
  ;

record_type
  : RECORD table_elements
  ;

table_elements
  : LEFT_PAREN field_element (COMMA field_element)* RIGHT_PAREN
  ;
{code}

Example statements as follows:
{code:sql}
CREATE TABLE T1 (
  A TEXT, 
  B INT4, 
  C RECORD (
    D TEXT, 
    E INT8, 
    F RECORD (
      G INT1, H FLOAT4
    )
  ), 
  Z FLOAT8
);
{code}

h3. Updates
 * I changed the type name 'struct' to 'record' according to TAJO


> CREATE TABLE should support the nested record definition.
> ---------------------------------------------------------
>
>                 Key: TAJO-1353
>                 URL: https://issues.apache.org/jira/browse/TAJO-1353
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: parser
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.11
>
>         Attachments: TAJO-1353.patch
>
>
> This patch adds the nested record definition to CREATE TABLE BNF. The changed 
> BNF is as follows:
> {code}
> predefined_type
>   : character_string_type
>   | national_character_string_type
>   | binary_large_object_string_type
>   | numeric_type
>   | boolean_type
>   | datetime_type
>   | bit_type
>   | binary_type
>   | network_type
>   | record_type
>   ;
> record_type
>   : RECORD table_elements
>   ;
> table_elements
>   : LEFT_PAREN field_element (COMMA field_element)* RIGHT_PAREN
>   ;
> {code}
> Example statements as follows:
> {code:sql}
> CREATE TABLE T1 (
>   A TEXT, 
>   B INT4, 
>   C RECORD (
>     D TEXT, 
>     E INT8, 
>     F RECORD (
>       G INT1, H FLOAT4
>     )
>   ), 
>   Z FLOAT8
> );
> {code}
> h3. Updates
>  * I changed the type name 'struct' to 'record' according to TAJO-809.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to