Skip to content

Formatter doesn't recognize Hive CREATE TABLE modifiers #797

Open
@melin

Description

@melin

Input data

Which SQL and options did you provide as input?

CREATE TABLE k8s_demos.dd_dd_dd 
(id string COMMENT 'd', name string COMMENT 'name') 
using paimon COMMENT '122' TBLPROPERTIES (
  'compression' = 'ZSTD',
  'bizOwner' = 'huaixin',
  'dataLevel' = 'P3',
  'dwClassification' = '',
  'subject1' = '',
  'subject2' = '',
  'primary-key' = 'id'
) lifeCycle 122;

Expected Output

CREATE TABLE k8s_demos.dd_dd_dd (
  id string COMMENT 'd', 
  name string COMMENT 'name'
) 
using paimon 
COMMENT '122' 
TBLPROPERTIES (
  'compression' = 'ZSTD',
  'primary-key' = 'id'
) lifeCycle 122;

Actual Output

CREATE TABLE k8s_demos.dd_dd_dd (id string COMMENT 'd', name string COMMENT 'name') using paimon COMMENT '122' TBLPROPERTIES (
  'compression' = 'ZSTD',
  'bizOwner' = 'huaixin',
  'dataLevel' = 'P3',
  'dwClassification' = '',
  'subject1' = '',
  'subject2' = '',
  'primary-key' = 'id'
) lifeCycle 122;

Usage

  • How are you calling / using the library?
  • What SQL language(s) does this apply to?
  • Which SQL Formatter version are you using?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions