-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
219 changed files
with
4,594 additions
and
1,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
{ | ||
"root": "./cottontaildb", | ||
"statistics" : { | ||
"threshold" : 1.0, | ||
"probability" : 0.5, | ||
"randomGeneratorName": "L32X64MixRandom" | ||
} | ||
"root": "/cottontaildb-data" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
...b-client/src/main/kotlin/org/vitrivr/cottontail/client/language/basics/expression/List.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ent/src/main/kotlin/org/vitrivr/cottontail/client/language/basics/expression/ValueList.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package org.vitrivr.cottontail.client.language.basics.expression | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
import org.vitrivr.cottontail.core.values.* | ||
import org.vitrivr.cottontail.grpc.CottontailGrpc | ||
import java.util.* | ||
|
||
/** | ||
* A list of [Literal] values [Expression]. Mainly used for IN queries. | ||
* | ||
* @author Ralph Gasser | ||
* @version 1.1.0 | ||
*/ | ||
@Serializable | ||
@SerialName("ValueList") | ||
class ValueList(val value: Array<PublicValue>): Expression() { | ||
constructor(list: List<Any>): this(when (list.first()) { | ||
is Boolean -> list.filterIsInstance<Boolean>().map { BooleanValue(it) } | ||
is Byte -> list.filterIsInstance<Byte>().map { ByteValue(it) } | ||
is Short -> list.filterIsInstance<Short>().map { ShortValue(it) } | ||
is Int -> list.filterIsInstance<Int>().map { IntValue(it) } | ||
is Long -> list.filterIsInstance<Long>().map { LongValue(it) } | ||
is Float -> list.filterIsInstance<Float>().map { FloatValue(it) } | ||
is Double -> list.filterIsInstance<Double>().map { DoubleValue(it) } | ||
is Date -> list.filterIsInstance<Date>().map { DateValue(it) } | ||
is String -> list.filterIsInstance<String>().map { StringValue(it) } | ||
is UUID -> list.filterIsInstance<UUID>().map { UuidValue(it) } | ||
is BooleanArray -> list.filterIsInstance<BooleanArray>().map { BooleanVectorValue(it) } | ||
is IntArray -> list.filterIsInstance<IntArray>().map { IntVectorValue(it) } | ||
is LongArray -> list.filterIsInstance<LongArray>().map { LongVectorValue(it) } | ||
is FloatArray -> list.filterIsInstance<FloatArray>().map { FloatVectorValue(it) } | ||
is DoubleArray -> list.filterIsInstance<DoubleArray>().map { DoubleVectorValue(it) } | ||
is PublicValue -> list.filterIsInstance<PublicValue>() | ||
else -> throw IllegalArgumentException("Cannot create ValueList from list of type ${list.first().javaClass.simpleName}.") | ||
}.toTypedArray()) | ||
|
||
override fun toGrpc(): CottontailGrpc.Expression { | ||
val builder = CottontailGrpc.Expression.newBuilder() | ||
for (data in this.value) { | ||
builder.literalListBuilder.addLiteral(data.toGrpc()) | ||
} | ||
return builder.build() | ||
} | ||
} |
Oops, something went wrong.