[
https://issues.apache.org/jira/browse/TAJO-1832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14902036#comment-14902036
]
ASF GitHub Bot commented on TAJO-1832:
--------------------------------------
Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/756#discussion_r40055988
--- Diff:
tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestQueryOnSelfDescTable.java
---
@@ -0,0 +1,185 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tajo.engine.query;
+
+import org.apache.tajo.QueryTestCaseBase;
+import org.apache.tajo.exception.AmbiguousColumnException;
+import org.apache.tajo.exception.TajoException;
+import org.junit.After;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class TestQueryOnSelfDescTable extends QueryTestCaseBase {
+
+ public TestQueryOnSelfDescTable() throws IOException, TajoException,
SQLException {
+ super();
+
+ executeString(String.format("create external table self_desc_table1
(*) using json location '%s'",
+ getDataSetFile("sample1"))).close();
+
+ executeString(String.format("create external table self_desc_table2
(*) using json location '%s'",
+ getDataSetFile("sample2"))).close();
+
+ executeString(String.format("create external table self_desc_table3
(*) using json location '%s'",
+ getDataSetFile("tweets"))).close();
+
+ executeString(String.format("create external table github (*) using
json location '%s'",
+ getDataSetFile("github"))).close();
+ }
+
+ @After
+ public void teardown() throws TajoException, SQLException {
+ executeString("drop table self_desc_table1").close();
--- End diff --
It's a trivial comment. It would be better if you put ``IF NOT EXISTS`` to
them. It will suppress error messages in unexpected cases.
> Well support for self-describing data formats
> ---------------------------------------------
>
> Key: TAJO-1832
> URL: https://issues.apache.org/jira/browse/TAJO-1832
> Project: Tajo
> Issue Type: New Feature
> Components: Planner/Optimizer
> Reporter: Jihoon Son
> Assignee: Jihoon Son
>
> *Problem*
> Tajo already has a support for self-describing data formats like JSON,
> Parquet, or ORC. While they are capable of providing schema information by
> themselves, users must define schema to query on them with the current
> implementation. To solve this inconvenience, we have to improve our query
> planner to support self-describing data formats well.
> *Solution*
> First, we need to allow omitting schema definition for the create table
> statement. When a query is submitted for a self-describing table, the columns
> which don't exist in that table will be filled with Nulls.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)