br1ghtyang / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Replace or remove switch-case() function #556

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
switch-case() function now is provided for selection among multiple conditions. 
For example,

for $i in range(1, 5)
return switch-case($i, 1, "A", 2, "B", 3, "C")

which returns

"A"
"B"
"C"
"C"
"C"

It has been used in some tpch test cases. In the future the function may be 
removed or replaced (marked as private).

Original issue reported on code.google.com by jarod...@gmail.com on 6 Jul 2013 at 8:34

GoogleCodeExporter commented 8 years ago
Or it could be left (quietly) and replaced w/syntax in cases where it's useful. 
 Is it more efficient than what happens with if-then-else sequences?  (Not 
entirely sure what the history of this "feature" is - how did it get there?)

Original comment by dtab...@gmail.com on 7 Jul 2013 at 6:21

GoogleCodeExporter commented 8 years ago

Original comment by jarod...@gmail.com on 18 Nov 2013 at 11:12