Skip to content

Commit

Permalink
Reuse Reference in readStorageTo calls for select in HBase
Browse files Browse the repository at this point in the history
  • Loading branch information
jurmous committed Feb 12, 2024
1 parent f5a155e commit da519cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ private fun <DM : IsDataModel> DM.readQualifier(
val definition = this[index]
?: throw DefNotFoundException("No definition for $index in $this at $index")

if (select?.contains(definition.ref(parentReference)) == false) {
val ref = definition.ref(parentReference)

if (select?.contains(ref) == false) {
null // Skip since not in select
} else {
readQualifierOfType(
Expand All @@ -232,7 +234,7 @@ private fun <DM : IsDataModel> DM.readQualifier(
refStoreType,
index,
select,
definition.ref(parentReference),
ref,
addChangeToOutput,
readValueFromStorage,
addToCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ private fun <DM : IsValuesDataModel> DM.readQualifier(
val definition = this[index]
?: throw DefNotFoundException("No definition for $index in $this at $index")

if (select?.contains(definition.ref(parentReference)) == false) {
val ref = definition.ref(parentReference)

if (select?.contains(ref) == false) {
null // Skip since not in select
} else {
readQualifierOfType(
Expand All @@ -126,7 +128,7 @@ private fun <DM : IsValuesDataModel> DM.readQualifier(
index,
refStoreType,
select,
definition.ref(parentReference),
ref,
addValueToOutput,
readValueFromStorage,
addToCache
Expand Down

0 comments on commit da519cf

Please sign in to comment.