From 3f65f1da2514cfc2d8f34ae751662f997178a9c6 Mon Sep 17 00:00:00 2001 From: Doug Lindholm Date: Wed, 4 Feb 2026 08:04:24 -0700 Subject: [PATCH 1/3] Update latis --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index adca0fe..afaf31b 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ ThisBuild / scalaVersion := "3.3.7" val fs2DataVersion = "1.8.1" val http4sVersion = "0.23.33" -val latisVersion = "792d62ed" +val latisVersion = "8880e46d" val latisHapiVersion = "d70da0a5" lazy val root = (project in file(".")) From 16ea950dc10ab66bafc9c7ed9322647bde9dc827 Mon Sep 17 00:00:00 2001 From: Doug Lindholm Date: Wed, 4 Feb 2026 08:04:52 -0700 Subject: [PATCH 2/3] Add long as a supported data type --- src/main/scala/latis/service/hapi/HapiService.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/latis/service/hapi/HapiService.scala b/src/main/scala/latis/service/hapi/HapiService.scala index 8a93310..6888098 100644 --- a/src/main/scala/latis/service/hapi/HapiService.scala +++ b/src/main/scala/latis/service/hapi/HapiService.scala @@ -50,6 +50,7 @@ class HapiService(catalog: Catalog) extends ServiceInterface(catalog, OperationR case "string" => md.getProperty("size").isDefined case "double" => true case "int" => true + case "long" => true case "float" => true //may be converted to double by ConvertHapiTypes case "short" => true //may be converted to int by ConvertHapiTypes case _ => false From 4c28d7f3fab8147594f1385e68b9e964ae23782c Mon Sep 17 00:00:00 2001 From: Doug Lindholm Date: Wed, 4 Feb 2026 13:27:19 -0700 Subject: [PATCH 3/3] update other handling of data types --- src/main/scala/latis/ops/ConvertHapiTypes.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/scala/latis/ops/ConvertHapiTypes.scala b/src/main/scala/latis/ops/ConvertHapiTypes.scala index e0cf68d..4c67917 100644 --- a/src/main/scala/latis/ops/ConvertHapiTypes.scala +++ b/src/main/scala/latis/ops/ConvertHapiTypes.scala @@ -27,6 +27,7 @@ class ConvertHapiTypes extends MapOperation { private def convertValue(data: Data): Data = data match { case v: ShortValue => IntValue(v.value.toInt) + case v: LongValue => IntValue(v.value.toInt) //TODO: risk of overflow case v: FloatValue => DoubleValue(v.value.toDouble) case _ => data //no-op, shouldn't get here due to catalog filter } @@ -45,6 +46,10 @@ class ConvertHapiTypes extends MapOperation { Scalar.fromMetadata( scalar.metadata + ("type" -> "int") ).fold(throw _, identity) //should not fail + case LongValueType => + Scalar.fromMetadata( + scalar.metadata + ("type" -> "int") + ).fold(throw _, identity) //should not fail case _ => scalar //no-op, shouldn't get here due to catalog filter } }