Skip to content

Commit

Permalink
Fix naskha_tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Lowey-Weber authored and Alexander Lowey-Weber committed Oct 2, 2024
1 parent 39487a2 commit 949461a
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 619 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ ${if (addFillFactor) "WITH (fillfactor="+if (table.isVolatile) "65)" else "100)"
self.createFn = Fx2 { conn, table ->
conn.execute(
self.sql(
"""gin (naksha_tags($c_flags,$c_tags), $c_id, $c_txn, $c_uid, $c_tuple_number, $c_flags)""",
"""gin (naksha_tags($c_tags,$c_flags), $c_id, $c_txn, $c_uid, $c_tuple_number, $c_flags)""",
table, unique = false, addFillFactor = false
)
).close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ package naksha.psql

import naksha.base.*
import naksha.geo.SpGeometry
import naksha.jbon.IDictManager
import naksha.jbon.JbDictionary
import naksha.jbon.JbEncoder
import naksha.jbon.JbFeatureDecoder
import naksha.jbon.*
import naksha.model.*
import naksha.model.FeatureEncoding.FeatureEncoding_C.JBON
import naksha.model.FeatureEncoding.FeatureEncoding_C.JBON_GZIP
Expand Down Expand Up @@ -262,7 +259,8 @@ class PgUtil private constructor() {
byteArray = encoded.encodeToByteArray()
} else if (encoding == TagsEncoding.JBON || encoding == TagsEncoding.JBON_GZIP) {
val encoder = JbEncoder(dict)
byteArray = encoder.buildFeatureFromMap(tags)
encoder.encodeMap(tags)
byteArray = encoder.buildFeature(null, FEATURE_VARIANT_TAGS)
}
if (flags.tagsGzip() && byteArray != null) byteArray = Platform.gzipDeflate(byteArray)
return byteArray
Expand Down
Loading

0 comments on commit 949461a

Please sign in to comment.