未验证 提交 8f67d0ab 编写于 作者: F Francesco 提交者: GitHub

feat(maven): Make output directory configurable (#835)

上级 eb67491a
......@@ -68,6 +68,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<benchmarks.outputPath>target</benchmarks.outputPath>
<!--
JMH version to use with this project.
......@@ -86,6 +87,7 @@
</properties>
<build>
<directory>${benchmarks.outputPath}</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -30,6 +30,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<outputPath>target</outputPath>
<nodejs.npm.cmd>npm</nodejs.npm.cmd>
<nodejs.version>v12.16.2</nodejs.version>
<runtime.assembly>none</runtime.assembly>
......@@ -76,6 +77,7 @@
</distributionManagement>
<build>
<directory>${outputPath}</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -157,6 +159,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
......
......@@ -29,7 +29,9 @@ import io.questdb.cairo.TableWriter;
import java.io.Closeable;
public interface InsertMethod extends Closeable {
// return inserted row count
/**
* @return inserted row count
*/
long execute();
void commit();
......
......@@ -161,7 +161,7 @@ public class VirtualRecord implements ColumnTypes, DelegatingRecord {
@Override
public int getColumnType(int columnIndex) {
return functions.getQuick(columnIndex).getType();
return getFunction(columnIndex).getType();
}
public ObjList<? extends Function> getFunctions() {
......
......@@ -1707,7 +1707,7 @@ public class PGConnectionContext implements IOContext, Mutable, WriterSource {
this.username = e.toImmutable();
}
LOG.info().$("propertry [name=").$(dbcs.of(nameLo, nameHi)).$(", value=").$(dbcs.of(valueLo, valueHi)).$(']').$();
LOG.info().$("property [name=").$(dbcs.of(nameLo, nameHi)).$(", value=").$(dbcs.of(valueLo, valueHi)).$(']').$();
}
characterStore.clear();
......
......@@ -1761,7 +1761,8 @@ public class SqlCompiler implements Closeable {
throw SqlException.$(tableName.position, "literal expected");
}
if (model.getColumnSet().size() > 0 && model.getColumnSet().size() != model.getColumnValues().size()) {
int columnSetSize = model.getColumnSet().size();
if (columnSetSize > 0 && columnSetSize != model.getColumnValues().size()) {
throw SqlException.$(model.getColumnPosition(0), "value count does not match column count");
}
......
......@@ -100,11 +100,9 @@ public final class Unsafe {
public static long getFieldOffset(Class<?> clazz, String name) {
try {
Field f = clazz.getDeclaredField(name);
// f.setAccessible(true);
return UNSAFE.objectFieldOffset(f);
return UNSAFE.objectFieldOffset(clazz.getDeclaredField(name));
} catch (NoSuchFieldException e) {
throw new RuntimeException(e);
throw new ExceptionInInitializerError(e);
}
}
......
......@@ -1747,7 +1747,7 @@ public class TableWriterTest extends AbstractCairoTest {
populateTable(new FilesFacadeImpl() {
@Override
public long getPageSize() {
return super.getPageSize() * super.getPageSize();
return super.getPageSize() * 500;
}
}, PartitionBy.MONTH);
}
......
......@@ -435,7 +435,7 @@ public class CopyTest extends AbstractCairoTest {
public void testSimpleCopy() throws Exception {
assertMemoryLeak(() -> {
compiler.compile("copy x from '/target/test-classes/csv/test-import.csv'", sqlExecutionContext);
compiler.compile("copy x from '/src/test/resources/csv/test-import.csv'", sqlExecutionContext);
final String expected = "StrSym\tIntSym\tIntCol\tDoubleCol\tIsoDate\tFmt1Date\tFmt2Date\tPhone\tboolean\tlong\n" +
"CMP1\t1\t6992\t2.12060110410675\t2015-01-05T19:15:09.000Z\t2015-01-05T19:15:09.000Z\t2015-01-05T00:00:00.000Z\t6992\ttrue\t4952743\n" +
......@@ -581,7 +581,7 @@ public class CopyTest extends AbstractCairoTest {
public void testSimpleCopyForceHeader() throws Exception {
assertMemoryLeak(() -> {
compiler.compile("copy x from '/target/test-classes/csv/test-numeric-headers.csv' with header true", sqlExecutionContext);
compiler.compile("copy x from '/src/test/resources/csv/test-numeric-headers.csv' with header true", sqlExecutionContext);
final String expected = "type\tvalue\tactive\tdesc\t_1\n" +
"ABC\txy\ta\tbrown fox jumped over the fence\t10\n" +
......@@ -601,7 +601,7 @@ public class CopyTest extends AbstractCairoTest {
public void testSimpleCopyForceHeader2() throws Exception {
assertMemoryLeak(() -> {
compiler.compile("copy x from '/target/test-classes/csv/test-numeric-headers.csv' with header false", sqlExecutionContext);
compiler.compile("copy x from '/src/test/resources/csv/test-numeric-headers.csv' with header false", sqlExecutionContext);
final String expected = "f0\tf1\tf2\tf3\tf4\n" +
"type\tvalue\tactive\tdesc\t1\n" +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册