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

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

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 OdpsShowPartitionsTest extends TestCase {

    public void test_0() throws Exception {
        String sql = "show partitions secods.xxx";
        OdpsStatementParser parser = new OdpsStatementParser(sql);
        SQLStatement stmt = parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toOdpsString(stmt);
        Assert.assertEquals("SHOW PARTITIONS secods.xxx", output);
    }
}
TOP

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

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.