Package com.alibaba.druid.bvt.sql.odps

Source Code of com.alibaba.druid.bvt.sql.odps.OdpsCreateTableTest_1

package com.alibaba.druid.bvt.sql.odps;

import junit.framework.TestCase;

import org.junit.Assert;

import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.dialect.odps.parser.OdpsStatementParser;
import com.alibaba.druid.sql.parser.Token;

public class OdpsCreateTableTest_1 extends TestCase {

    public void test_0() throws Exception {
        String sql = "CREATE TABLE sale_detail_like LIKE sale_detail;";
        OdpsStatementParser parser = new OdpsStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toOdpsString(stmt);
        Assert.assertEquals("CREATE TABLE sale_detail_likesale_detail_like LIKE sale_detail", output);
    }
}
TOP

Related Classes of com.alibaba.druid.bvt.sql.odps.OdpsCreateTableTest_1

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.