arina-ielchiieva commented on a change in pull request #1993: DRILL-7601: Shift column conversion to reader from scan framework URL: https://github.com/apache/drill/pull/1993#discussion_r384453827
########## File path: exec/java-exec/src/test/java/org/apache/drill/exec/store/easy/text/compliant/TextCsvWithoutHeadersWithSchema.java ########## @@ -0,0 +1,163 @@ +/* + * 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.drill.exec.store.easy.text.compliant; + +import org.apache.drill.common.types.TypeProtos.MinorType; +import org.apache.drill.exec.physical.rowSet.RowSet; +import org.apache.drill.exec.physical.rowSet.RowSetBuilder; +import org.apache.drill.exec.record.metadata.SchemaBuilder; +import org.apache.drill.exec.record.metadata.TupleMetadata; +import org.apache.drill.test.rowSet.RowSetUtilities; +import org.joda.time.LocalDate; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * Tests the combination of a CSV file without headers, but with a + * provided schema. The provided schema <b>must</b> list columns + * in the order they appear in the file, with no holes. The column + * list need not be exhaustive, however, there can be unlabeled columns + * at the end which are ignored. No `columns` array is created in + * this case. + * <p> + * Not exhaustive: once we get past building the schema, operation + * is identical to the with-headers, with-schema case. + */ +public class TextCsvWithoutHeadersWithSchema extends BaseCsvTest { Review comment: Maybe we should also update the docs, describing this new feature (https://drill.apache.org/docs/create-or-replace-schema/). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
